Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
3.1k views
in Plugins by
It seems to revert back to unlike situation every time I press the like button. It shows 1 for a second and then go back to earlier position.
Q2A version: 1.5
by
I don't know the solution but i'm 50% sure that is facebook login foult, i had some issues earlier with fb like, turing off fb login solved prblem.
by
turning off the fb login!
does that mean I can not have both the facebook log in and the like option together?
by
and turning off fb login did not work for me.

2 Answers

0 votes
by
Thanks, I didn't notice this.  I've made Facebook load in in an iFrame with no javascript, so it should work now... please let me know with the latest version.
by
@ NoahY, could you please let me know whether the plugin can be used such a way that when someone likes a question it would actually show in his or her facebook page.
by
it shows for me on my page when I like something...
by
Could you please check mine and please let me know why its not working in my case?
I really appreciate your support.
http://www.spreadthelight.info/28/what-do-you-guyz-think-about-global-warming
by
Yep, works for me; note, it shows up on my facebook profile, not a page of my choosing.
0 votes
by
I still have that same problem with Facebook xfmbl version.

To use this more versatile version of the button, one needs to include the java sdk provided by facebook in the layout menu as custom html code.

It is basically the same which is loaded when fb login is active.

The problem is, if one is logged in through facebook the java sdk appears twice in the source code. And this causes strange behaviour of the website.

It would be great if some one could give a hint how to modify the facebook plugin that way, that the java sdk is allways loaded, not only if a fb cookie exists.

This shouldnt affect NOAHs Share plugin, as he does not use the xfmbl version, but the iframe version.
by
having issues with both versions, updated to iframe, still not working (clicking like has no effect, javascript error), see: http://www.question2answer.org/qa/14799/share-plugin-updated-noahy-facebook-like-not-working
by
edited by
The xfmbl version does work, there ist just that issue with the sdk twice in source code, what within other issues causes that you get two likes each time one clicks the like button.

I have that in my layout -> Custom HTML at top of every page:

<div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({
      appId  : 'myappid',
      status : true, // check login status
      cookie : true, // enable cookies to allow the server to access the session
      xfbml  : true  // parse XFBML
    });
  };
  (function() {
    var e = document.createElement('script');
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    e.async = true;
    document.getElementById('fb-root').appendChild(e);
  }());
</script>



Changed through advanced theme the function doctype () using:

$this->output('<!DOCTYPE HTML><html xmlns="http://www.w3.org/TR/html4/loose.dtd" xmlns:fb="https://www.facebook.com/2008/fbml">');

Then I have set in advanced theme in the function head_metas() :


$this->output('<meta property="og:url" content=""/>');
$this->output('<meta property="og:type" content="website"/>');
$this->output('<meta property="og:description" content=""/>');
$this->output('<meta property="og:title" content=""/>');
$this->output('<meta property="fb:app_id" content=""/>');
$this->output('<meta property="fb:admins" content=""/>');
$this->output('<meta property="og:image" content=""/>');

And finally implemented the button as follows:


<div class="like">
<fb:like href="" send="false"  layout="button_count" width="50" show_faces="false" action="like" font=""></fb:like>
</div>

Thats all. That way the button takes the image You specified in the og parameters and likes the actual url. If You want it to like another url You can set it in the href parameter.

But, there still remains the problem with the sdk loaded twice, when one is logged in through facebook as the fbplugin loads the sdk as well if a fb cookie exists or so...

EDIT: You can see effects on www.algarve-portugal.de

Check as well the source code when logged in through fb abd when not, so You see the two times loaded sdk.
...