I am using facebook like social plugin as follows.
<fb:like send="true" width="320" show_faces="true" font=""></fb:like>
If there is no href defined, this is said to be pick the current page.
I have a news website and I just want to integrate this like plugin per page, and when someone like a specific news page, i want that to be displayed in user profile.
However this is not the case right now.
I have debug it with firebug and it s getting/sending correct URL to facebook but on facebook profile, i dont see that URL that was liked.
How can i do that?
Why don’t you just put the actual URL into the href attribute of fb:like …?
Related
I have added a facebook like button to my site at http://forkmyreligion.com. I have triple checked all the settings for the app on my developers.facebook page and I'm pretty sure its all correct - the domain is correct, the website url is correct and I have the correct app id for the application.
The problem though is that clicking on the like button results in the user liking the facebook social plugins page rather than my page.
Any ideas what the problem might be?
Thanks
The Like button on your page is Liking the social plugins page because the Like button on your page has a data-href parameter which is explicitly configuring the like button to like that URL:
You have this:
<div class="fb-like" data-href="https://developers.facebook.com/docs/plugins/" data-colorscheme="light" data-layout="standard" data-action="like" data-show-faces="true" data-send="false"></div>
You need to set the data-href to the URL you want the button to display and increment the like count of.
This parameter is mentioned on the Like button documentation and the example in the documentation is the URL https://developers.facebook.com/docs/plugins/
Recently facebook rolled out some changes which have apparently broken like button functionality on on pages I'm working on, particularly for urls that point to a photo (photoset) on facebook, e.g. a facebook button like
<fb:like href="http://www.facebook.com/photo.php?fbid=ID&set=SET" ....></fb:like>
The button renders, however when I click 'like' it immediately 'unlikes' itself afterwards. *Non-facebook URLs work fine with the like button, only URLs that point to photos/content on facebook cause the like button to immediately unlike itself after it's clicked. The buttons are generated via the JSSDK as iframes. Is there a solution to this problem? We're not using og metadata.
Facebook like buttons strips all the get parameters of urls, so although you have this
<fb:like href="http://www.facebook.com/photo.php?fbid=ID&set=SET" ....></fb:like>
The url retrieved by facebook is this
<fb:like href="http://www.facebook.com/photo.php" ....></fb:like>
EDIT
As you may have not noticed on the 10th of july one of the break changes is the url of the social plugins
Social plugins will require an absolute URL in the 'href' parameter
Social plugins, such as the Like Box and Like Button, will require an
absolute URL in the 'href' parameter.
https://developers.facebook.com/roadmap/#q4_2013
I've always encountered issues with using Facebook's developer tools with resources on its own domain and, for that reason, always recommended "proxying". In other words, you would create a unique resource on your web server to represent the Facebook photo, this resource would garner likes and shares, but when a user visited the page, they would be redirected to the real photo.
For example:
<fb:like href="http://www.example.com/fakeresources/photo.php?fbid=ID&set=SET" ....></fb:like>
When you load http://www.example.com/fakeresources/photo.php?fbid=ID&set=SET:
<meta property="og:title" content="The Rock" />
<script>top.location.href="http://www.facebook.com/photo.php?fbid=ID&set=SET";</script>
Unfortunately, for the og:image tag, you will also need to create a proxy, because the Facebook scraper will often not fetch from its own servers.
I've even encountered times when Facebook will not fetch from a URL because the URL has a query parameter which looks like a URL which is on its own servers, for example:
http://www.example.com/fakeresources?url=facebook.com/photo.php?fbid=ID&set=SET
(query parameter not url-encoded for readability)
For which, encoding the URL with rot-13 is sufficient.
I have a Wordpress.org based website and I've set it up so that on each individual "post" page (single.php file) there's a Like button above the post so users can Like that individual post.
I was using iFrame and just switched over to XFBML but it didn't fix my problem. My code is:
<fb:like send="false" layout="button_count" width="80" show_faces="false"></fb:like>
The problem is when someone clicks "Like" it shows up in their "Other" Like activity on their Facebook page because I guess each post is considered it's own page. How can I make it so each post isn't considered a page and the Like results do not show up in someones "Other" activity?
My website is www.RockItPro.com and for example a single post url is http://www.rockitpro.com/2012/01/04/flyawayhook/
You could use a like button with a fixed url:
<fb:like href="http://example.com" send="true" width="450" show_faces="true"></fb:like>
That way you likes would end up summed to the page, on the other hand this defeats the purpose of liking those articles for the article as every user on facebook would get redirected to the fixed page.
To fix the Other-Category you will need to categorize your page. See https://developers.facebook.com/docs/opengraph/ for examples how to use so you can tag your ownership of the page and get admin permissions to it's facebook representation.
I am trying to set up a like button for my app. I have written this code:
<fb:like href="http://ilovecapitals.com" send="false" layout="standard" width="500" show_faces="false" font="arial"></fb:like>
But it seems Facebook doesn't link the likes from here to the likes of the app. How do I add a like button on my page that actually 'likes' my app, not the URL itself?
Thank you!
P.S.: That URL is a Facebook application.
When you say "Like" a Facebook application then it's one of the two options:
The application profile page (for example the FarmVile Page)
should be something like:
http://www.facebook.com/FarmVille (if you have enough fans) Or
http://www.facebook.com/apps/application.php?id=APP_ID
Or the application Canvas Page (for example FarmVile Game)
should be:
http://apps.facebook.com/canvas_name/
I'm having a problem with the good ol' facebook like button on my site. I've implemented it all, I can click on "like" and it appears on my wall (and on the site the count pops up to say "1"), but the count never updates. If I refresh the page it just shows the "like" button again (no count), and if I log in to facebook with a new account and click on like again, it just says "1" again.
An example page on my site:
http://www.makemeacocktail.com/recipe/6741/
The fql readout (watch the apostrophe escape here, copy and paste dont just click):
https://api.facebook.com/method/fql.query?query=select%20total_count,like_count,comment_count,share_count,click_count%20from%20link_stat%20where%20url='http://www.makemeacocktail.com/recipe/6741/'&format=json
The FB XML that is being used:
<fb:like href="http://www.makemeacocktail.com/recipe/6741/" send="false" layout="button_count" width="50" show_faces="false" font="arial"></fb:like>
Other facebook thoughts etc:
I've got the facebook open graph meta data in the head
The js call to facebook happens as the last thing on my page, after the FBML:
<script src="http://connect.facebook.net/en_US/all.js#appId=187430904631019&xfbml=1"></script>
<script>
FB.init({
appId : '187430904631019',
status : true,
cookie : true,
xfbml : true
});
</script>
I've also got the facebook page like at the bottom of my page:
<div id="fb-root"></div><fb:like-box href="http://www.facebook.com/makemeacocktail" width="292" show_faces="false" stream="false" header="true"></fb:like-box>
Which is where the fb-root is.
My only thought it something about fb-root not being next to the facebook like button earlier up, and a conflict of two facebook like buttons or something? I;m only calling the facebook js once though, right at the bottom.
Any thoughts help etc much appreciated. It is weird because it it going to my wall, but the button on the site isn't listening!
Thanks a lot
Got this from the request your like button sends to facebook:
App ID does not match domain","full":"The app ID specified
within the \"fb:app_id\" meta tag is
not allowed on this domain. You must
setup the Connect Base Domains for
your app to be a prefix of
http:\/\/www.makemeacocktail.com\/recipe\/6741\/
So, you need to change the base domain for your application in the developers application to makemeacocktail.com. If that is not the problem try removing the fb:app_id open graph tag, or use the fb:admins tag instead. Good luck, hope this helps.