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
Related
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
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.
I waited for 1 month before posting this question.
On 2 my websites facebook button doesn't work, it shows 0 likes even if I click like and reload the page. On another website (always https) it works.
What it can be?
Example, doesn't work here:
https://www.intherimini.com/en/
<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&appId=185407924984797";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" data-href="https://www.intherimini.com/" data-layout="button_count" data-action="like" data-show-faces="true" data-share="true" style="padding:3px 10px 3px 30px;"></div>
On another website (incinqueterre.com) it works fine with the same code (only href and appID is changed). The both App have the same parameters....
Finally I found the problem.
If your website has more than 1 language and the initial page just redirects you to your language page - it's not possible to set like button to the domain name. You have to set it to the page without redirect.
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.
I am trying to add a 'like' ('recommend') button to my site.
The facebook buttons appear on my website, but it doesn't show that 126 people are already members of the group.
I am testing to see if it works on this page.
http://www.quantummassageworks.com/indexFB.html
Here's the JavaScriptSDK:
<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>
And the code for the plugin:
<div class="fb-like"
data-href="https://www.facebook.com/groups/51418441750/"
data-send="true" data-layout="button_count"
data-width="450" data-show-faces="false" data-action="recommend">
</div>
Ok.. so your problem here is on of terminology I think. One can not "LIKE" a group. He can be a member of that group but not "LIKE" it. In the same way - one can not "LIKE" a user.
What you can do is "LIKE" a post, comment, photo, note, etc.. and also...
drum roll please
A Page!
If you have a page that represents your group you can link it to the like button by placing the page's URL in the data-href property of the like button div.