Facebook "like" button does not display - facebook

I have been trying to put a facebook "like" button in one of my webpages. To do that, In the process of doing this, I copied an example at "Like Button Configurator" by facebook, but no "like" button shows up. I ran it against the facebook debugger, but found no errors (except one complaint about the size of "og:image" picture). I also searched/reviewed related posts/answers in this forum. Any advice on how did I do it wrong will be greatly appreciated.
My test page is here. You're welcome to examine the source by "view source" on the test page.

Try to use this code
After body:
<div id="fb-root"></div>
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/ru_RU/sdk.js#xfbml=1&version=v2.4";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="fb-like" data-href="https://developers.facebook.com/docs/plugins/" data-layout="button_count" data-action="like" data-show-faces="true" data-share="false"></div>

It turns out that I need to add "&appId=xxxxxxxxx" at the end of the following line:
js.src = "//connect.facebook.net/ru_RU/sdk.js#xfbml=1&version=v2.4"; to make it
js.src = "//connect.facebook.net/ru_RU/sdk.js#xfbml=1&version=v2.4&appId=xxxxxxx"
where xxxxx is a valid Facebook AppId. It works now.

Related

Facebook social plugin doesn't show

Every time I put a dynamic url in my facebook social plugin, the like buttons won't show or load.
This is what I did.
<div class="fb-like" data-href="{{$business->fb}}" data-layout="standard" data-action="like" data-size="small" data-show-faces="true" data-share="true"></div>
I already load the script
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&version=v2.9&appId=xxxxxxxxx";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
But the like and share buttons won't show and there are no errors in the console.
Please take a look at this page. https://developers.facebook.com/bugs/1914581255449300/?hc_location=ufi
Seems like there's a global issue with the like and share button. Keep an eye on this page to see if it's fixed or not.
Regards,
Andrew

facebook like button: my application replaced by like social plugins

I copy paste the facebook like button from
https://developers.facebook.com/docs/plugins/like-button#configurator
I insert that, problem is:
The button appears,
instead of liking my own page, it likes "social plugins" 2.3 millions !
What may I missed ?
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/fr_FR/sdk.js#xfbml=1&version=v2.5&appId=1654009128211856";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" data-href="https://developers.facebook.com/docs/plugins/" data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"></div>
You need to enter your url on the configurer which you can find here:
You must have left the default link which is:
https://developers.facebook.com/docs/plugins/
Which has 2.3 million likes!
Good luck!
There is a form on that page that you plug in values, before you click "Get Code" to get cut-in-paste HTML code.
If you left their default URL in "URL to Like" there instead of your URL, this behavior would be explained

Facebook Share Button - 'Attachment Could Not be Found'

I have implemented the Facebook share button as follows:
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" data-href="http://www.facebook.com/bookf1" data-layout="button_count" data-share="false" data-width="180" data-show-faces="false" data-font="tahoma"></div>
<div class="fb-share-button" data-type="button"></div>
It appears on my website as expected and clicking it brings up the sharer.php with the expected display. However, when I click the 'Share Link' button it shows the 'thinking' animation for a second then nothing happens. The sharer.php pop-up just remains on-screen.
If I try and share the link via a private message I get an error saying "The Attachment Could Not Be Found".
This is running on a publicly accessible URL.
Any suggestions would be greatly appreciated as I can't seem to find this issue anywhere else.
Thanks!
I ran into a similair issue with exactly the same symptoms and wasted some time here.
After clicking my share-button the expected popup opened. In the url it was visible that sharer.php was called with an unknown (to me at least) app-id as parameter. After creating a facebook app for the website in question and putting the newly created app-id as parameter ..
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&appId=MY_APP_ID&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
.. it worked.
For debugguing purposes it could be helpful to put another source for js.src:
[...]
js.src = "//connect.facebook.net/de_DE/sdk/debug.js[...]
[...]
This will log debugging messages to the js-console. (As can be read up here: https://developers.facebook.com/docs/javascript/quickstart/v2.0#advancedsetup)

Facebook like button comment box not working with flickr

I have a js fiddle that demonstrates the issue
http://jsfiddle.net/RLQUR/
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" data-href="http://www.flickr.com" data-send="true" data-width="450" data-show-faces="true"></div>
The code in the fiddle is directly from the facebook like button generator.
If you change the url to something like "http://www.google.com" it works just as it should. However, when using a flickr url and trying to click "Post to Facebook" it makes an AJAX request and returns with a status of 200 OK but does not post the comment to the profile or close the popup.
I believe this is likely a bug with the facebook like button, however I am unable to create a bug on the developer page for an unknown reason. I do not see a "Create" button on the page.
Any help is appreciated.

Facebook Like button getting disappeared when clicked

The like button is getting disappeared when user clicks on the button.
Code used
<div id="fb-root" style="display:none">1</div>
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="winefacebook" style="float:left;">
<fb:like send="false" layout="button_count" show_faces="false" >.</fb:like>
</div>
Can anyone suggest a solution to this isue?
Many Thanks
As far as I understand Facebook Like button is now working with problems because of some minor system issues. This bug is reported quite often at their support forum. I'm afraid you can't really do anything with this until they will fix this.
The only thing I can suggest is to check your site with their debugger http://developers.facebook.com/tools/debug
Good luck.