I have Facebook Like button but it is not showing in my timeline. When I clicked the like button in my website. It will change to Confirm that once I clicked this, small window will popped up to like that product. In the link of that small window it says something like this
http://www.facebook.com/plugins/error/confirm/like?iframe_referer=http%3A%2F%2F3beacheschemist.doublet.com.au%2Fproductdetail.aspx%3Fname%3DSWISSE-HAND-CREAM-WITH-VIT-F---POMEGRANATE-100ML&secure=false&plugin=like&return_params=%7B%22api_key%22%3A%22171681722971300%22%2C%22locale%22%3A%22en_US%22%2C%22sdk%22%3A%22joey%22%2C%22channel_url%22%3A%22http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D17%23cb%3Dffcb50044%26origin%3Dhttp%253A%252F%252F3beacheschemist.doublet.com.au%252Ff39b47030%26domain%3D3beacheschemist.doublet.com.au%26relation%3Dparent.parent%22%2C%22href%22%3A%22http%3A%2F%2F3beacheschemist.doublet.com.au%2Fproductdetail.aspx%3Fname%3DSWISSE-HAND-CREAM-WITH-VIT-F---POMEGRANATE-100ML%22%2C%22node_type%22%3A%22link%22%2C%22width%22%3A%22450%22%2C%22layout%22%3A%22standard%22%2C%22colorscheme%22%3A%22light%22%2C%22action%22%3A%22recommend%22%2C%22show_faces%22%3A%22false%22%2C%22send%22%3A%22true%22%2C%22extended_social_context%22%3A%22false%22%2C%22ret%22%3A%22sentry%22%2C%22act%22%3A%22connect%22%7D
Before, it is working.All of a sudden I need to change anything which is I don't know.
First, always use the like button generator:
https://developers.facebook.com/docs/reference/plugins/like/
Second, it helps in many cases to use the like button with an app id. Usually the spam confirmation does not show up that often if you use an app id for the facebook integration.
Example (fill in the appId):
<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&appId=xxxxxxx";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
If that does not work, you can only wait, or maybe it helps to refresh the liked URL in the Facebook debugger:
https://developers.facebook.com/tools/debug
Related
My search didn't come up with a relevant answer for my problem so I post here hoping to get guidance.
I am developing a not-for-profit website for finding assisted-living solutions.
Each web page has social buttons for sharing/liking in Facebook and it shows the number of shares/likes. We do not require logging for viewing pages.
The problem is that we are constantly hitting the rate limits because of the API calls to get the number of likes (which is important to present) and then the Facebook buttons do not show.
this problem is several months old, probably the limits were changed, or maybe permissions?
All calls are done with the app id.
This is the js that is used when a page loads:
//<!--Start Facebook Script-->
window.fbAsyncInit = function () {
FB.init({
appId: 'my-app-id',
xfbml: true,
version: 'v3.1'
});
};
(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 = 'https://connect.facebook.net/he_IL/sdk.js';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
And the markup for the Facebook buttons is also standard - as suggested by Facebook.
<div style="padding:5px 0; display:inline-block; vertical-align: middle;">
<div class="fb-like" data-layout="button_count" data-href="the-webpage-url" data-action="like" data-size="large" data-show-faces="false" data-share="true" style="display:inline-block;"></div>
</div>
Here are solutions that we have seen but do not wish to use:
We do not want to cache social information
We do not wish to force users to login in order to view the number of likes etc. (Of course they do have to log if they want to actively share or like).
I hope someone can suggest a solution.
Thanks
I get the like button code from https://developers.facebook.com/docs/reference/plugins/like/, and on my page, the like button is rendered correctly...at least it looks like so :P
But when I click on the like button, the comment dialog appear and disappear immediately, and the button becomes a Confirm link; then I click on the like, a popup window ask me to confirm to like it...then, when I back to my page, I can see the comment dialog. But whatever I input, after I clicked on the Post button, the dialog will not close.
In my Chrome console, I see when I click on the Post button, a request is make to https://www.facebook.com/plugins/like/comment, and the return result is:
for (;;);{"__ar":1,"payload":null}
I compared this behavior on other sites, and it is clear the return is different. But I have no idea why.
Usually that problem can be fixed by using an app id in the init 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/de_DE/all.js#xfbml=1&appId=xxxxxxxxx";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
That´s Facebooks spam protection...
actually what luschn is right. you should create appID. facebook needs to count the LIKES when one clicks on it. you know, it's so simple. perhaps there's something you need to grab from the button :p
Try this stuff:
<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&appId=null";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<span class="fb-like" data-href="https://www.facebook.com/fb-name" data-layout="button" data-action="like"></span>
appID set into null. This works, but it's spamming. This is just for experiments only.
Here's the sample page:
http://developer.appacyber.net/feed/test.php
It also works on localhost :D
i have a gridview displaying articles and for every article i,e for every row of a grid i want to put face book like button. how can i achieve this...
In itemtemplate of my grid i have placed the below 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'));
' data-layout="button_count" data-width="450" data-show-faces="false">
but, it is working for few articles only,if you like for few in my facebook profile page i am getting muliple likes of one article instead of only one like. this is my major problem pls give me solution to this. Thanks
Our site pops up a modal javascript/jquery dialog, which requires the user to either close or "Like" on facebook to proceed. We are using the HTML5 version of the "Like" code.
The "Close" works fine, but how do I get the dialog to close when the user clicks on "Like"?
The actual "Like" button is provided by Facebook in an IFrame, and I haven't been able to get to it via JavaScript yet.
Any ideas?
Subscribe to the edge.create FB JS event (http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/) and close your popup once you receive that. However, you will run into issues because after a like, Facebook also likes to put up a dialog that allows the liker to post a link to their wall about it. So you might accidentally hide that one by closing your dialog too early.
First of all check that the following code implemented:
<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/all.js#xfbml=1&appId=261463080590982";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Then just do the following:
<script>
FB.Event.subscribe('edge.create', function(response) {
close_function()
});
</script>
Where close_funciton() is the same function what you call in normal close.
More information about this feature: https://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/
If you have more like button in same page with different "function", that's fun.
If you don't want to show it at all
you can use the CSS code below
.fb_edge_widget_with_comment{
position: absolute;
}
.fb_edge_widget_with_comment span.fb_edge_comment_widget iframe.fb_ltr {
display: none !important;
}
Hope it helps :)
I have had a like box for a while on my website but wanted to upgrade it to one showing recent posts. My site is created in iWeb.
I went to the social plugins section and created the box for my page www.facebook.com/rivieracoaching but when I click 'Get code'the dropdown box where it says "This script uses the app ID of your app:" the dropdown box only shows an old page that I have deleted - I can't see any of my actual current pages to choose from.
This is odd because the preview on FB looks correct and in the code it does seem to say Riviera Coaching but when I copy/paste it into the iWeb HTML snippet nothing shows. I googled and an iWeb specialist says to copy/paste the code from the IFRAME section so i did that but no joy. Am I doing something wrong or is this a glitch in FB/iWeb?
The code FB is generating is:
<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/all.js#xfbml=1&appId=124751684204020";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Please help, this is most frustrating!
You're not forced to specify an appId to simply include a like box. You can use the following js code :
(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'));
And then include your xFBML like box code :
<fb:like-box href="www.facebook.com/rivieracoaching " width="292" show_faces="true" stream="true" header="true"></fb:like-box>