When I clicked the LIKE or SEND buttons on my site for this link, I get this error:
The page at http://aftersqool.com/a?id=C217EE could not be reached.
Strangely, the page is loading without any issues. The page even has the og tags that Facebook requires.
Anyone know why Facebook is giving this error? What should I do to get the buttons working?
Thanks!
Gus Collazo
AfterSqool.com
You can’t use the Send Button if you’re using Facebook as a Page instead of a Personal Profile.
The Send Button only works with XFBML version of the Like Button; it doesn't work with the iFrame version of the Like Button, per Facebook’s announcement
One more important thing is to provide your facebook page's URL in send and like button. It will defiantly fix it.
If your facebook page URL is: http://www.facebook.com/aftersqool
put this code in it
/*put this code in 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/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
/*put this code in site where you want to add it*/
<div class="fb-like" data-href="http://www.facebook.com/AfterSqool" data-width="450" data-show-faces="true" data-send="true"></div>
I could not get Smit Shilu solution to work. I had to remove xfmb=1 to get my buttons to work. Full solution here.
http://metadataconsulting.blogspot.ca/2013/09/facebook-likesend-button-not-working.html
Related
I created a Facebook share widget on my page. When I use the widget to share the page to my own Facebook account, I find that the box that gets created on my timeline contains a link "WIDGET_LIKE_LOG_APP".
When I click that link, it takes me to a page
https://www.facebook.com/games/?app_id=107599262613689
with the error message :
Sorry, WIDGET_LIKE_LOG_APP hasn't been approved for display in App
Center.
How can I prevent Facebook from creating that WIDGET_LIKE_LOG_APP link?
Code on my page to create the share widget:
<div id="fb-root"></div>
<script type="text/javascript">
(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/sdk.js#xfbml=1&version=v2.3";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="fb-like" data-href="#Model.Url" data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"></div>
Looking at your code it seems you are using the Like Button instead of the Share Button.
Anyway the problem is that you are not specifying an appId on the widget definition (on the js.src parameter). You can use the wizard on the Like Button page to get the specific code that you should embed in your page.
I reported this issue to Facebook. They confirmed this was a bug. They've now come back to me saying the bug has been fixed.
I've some trouble with the Like Button. I would like to like a specific post like this one from a external website but it doesn't work:
https://www.facebook.com/236086869778323/posts/597301643656842
For this button I used the following code, which is given by Facebook Developers
<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/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" data-href="https://www.facebook.com/236086869778323/posts/597302473656759" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
When you read the documentation about the Like Button it states
A single click on the Like button will 'like' pieces of content on the web and share them on Facebook. You can also display a Share button next to the Like button to let people add a personal message and customize who they share with.
These pieces of content are external. That is the Like Button is intended to be used for webpages outside of Facebook to share in Facebook.
You will need to use Embedded Posts instead https://developers.facebook.com/docs/plugins/embedded-posts/
Can anybody tell how is it possible to create a facebook like button with the option to add a message? example can be found here http://www.familycircle.com/style/beauty/hair/summer-hairstyles/
If user does not write anything as a message, the button behaves like normal like button. If user writes a message, it will appear on his/her wall. Thank you.
As Facebook says:
When will users have the option to add a comment to the like?
If you are using the XFBML version of the Like button, users will always have the option to add a comment. If you are using the iframe version of the button, users will have the option to comment if you are using the standard layout. If users do add a comment, the story published back to Facebook is given more prominence.
Like Button
that's the normal behavior of facebook's like button. You have the option of writing a comment or message, and here's how I do it, with HTML5
put this after the body tag
<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=YOURAPPID";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
put this where you want to see the button
<div class="fb-like" data-href="http://someurl.com" data-send="true" data-width="450" data-show-faces="true"></div>
Or create yours here
I have recently implemented the Facebook Like Button
I have chosen some settings (for the HTML5 implementation) and facebook gave me the following code:
<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=*my-app-id*";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
and
<div class="fb-like"
data-href="*http://my-domain.com/page/uri*"
data-send="false"
data-layout="button_count"
data-width="50"
data-show-faces="false"
></div>
I have implemented this code on my public website.
When I click the button it changes the button to the "liked" state and shows a dialog that I can use to post to my wall.
The wallpost works fine (and Facebook manages to extract the Open Graph meta tags from the page like image, title, url and so on...) when I refresh the page, the buttons shows up as one like, but when I visit the same url with another browser and facebook account the like button indicates that the page is not liked by anyone.
If I then check my https://graph.facebook.com/me/likes in Graph API Explorer the like does not show up in the list.
I have also tried to use Facebook's Debugger to make Facebook refresh the data for the url as I found on http://www.allwebmaster.com/2011/07/fix-facebook-like-button-not-working/ but that did not seem to help.
So the wallpost works but the like does not, why is that? What can I do to make it work?
Update: now I have a few likes on some of the pages but it does not correspond to the number of accounts that has liked that url...
I installed facebook comments on my website. My website is a dynamic website and pages are like this www.example.com/page?id=54, www.example.com/page?id=67
If I post a comment in this page: www.site.com/page?id=54, it also appears in www.example.com/page?id=67. The comments are not unique for a page, but appear in every page. Why is that ?
It seems that FB ignores the ?query part of the URL when retrieving comments.
What you could do: use some form of URl rewriting, so that your URLs are in the form http://www.example.com/page/id/54/ or similar (i.e., appearing to not use the ?id=something query part). That way, the comments should load for each page separately.
Here is a solution that worked for me.
1- Copy this SDK from Facebook. Most probably you already did that.
<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=114215202075258";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
2- Then this
<div class="fb-comments" data-href="http://example.com" data-width="470" data-num-posts="3"></div>
3- The the solution line. Paste these lines of JS at the end. Make sure you do everything in the similar order as I have. It will work, no matter you have a ? in your URL.
<script>
$(".fb-comments").attr("data-href", window.location.href);
</script>