I've implemented a Facebook Like plugin on a XHTML website (can't update the doctype to html5).
Say each "post" have a Like button.
I want to create a page with a selection of "posts" and each one will have a Like button.
2 questions:
Is it possible to share the information of a post when a user clic on a like in this page?
Obviously, I can't use the open graph meta data because it's page related, not post related.
I would like the title, the photo and a short description shared on the facebook user account.
Is it possible to know/retrieve the list of Facebook users who "liked" a particular "post"?
Edit: The answer is no.
Thank you for your answers or advices !
If I understand correctly the question is how to add like button for individual articles into a page which has a list of multiple articles.
Use the URL of the individual blog entry in the Like button code. For example if using HTML5 version of Like button then something like:
<div class="fb-like" data-href="http://www.example.com/blog/1" data-send="false" data-width="450" data-show-faces="false"></div>
<div class="fb-like" data-href="http://www.example.com/blog/2" data-send="false" data-width="450" data-show-faces="false"></div>
Or if using XFMBL version then:
<fb:like href="http://www.example.com/blog/1" send="false" width="450" show_faces="false"></fb:like>
<fb:like href="http://www.example.com/blog/2" send="false" width="450" show_faces="false"></fb:like>
Related
I'm wondering if it is possible to synchronize the likes between the like button on your actual page & the likes you get on facebook itself!?
For example..... we currently have 15 likes on FB but the AddThis widget on our website only shows 1 like.
So I'm wondering, is there a way you can synchronize the two either with AddThis or ShareThis; doesn't matter the platform, just would prefer it to be synchronized.
I take it if you grab the code from facebook itself rather then use these services then it will be synchronized?
If you specifically point your like URL fb:like:href="THE URL" to your Facebook page when you call the AddThis like button it should be in sync with the likes there.
Like so:
<a class="addthis_button_facebook_like" fb:like:href="THE URL TO YOUR FACEBOOK PAGE"></a>
For example:
<a class="addthis_button_facebook_like" fb:like:href="http://www.facebook.com/nike"></a>
Because you reference FB Social Plugins in your tags, I can confirm that this is definitly the case for Facebook's own like button.
<div class="fb-like" data-send="false" data-layout="standard" data-width="450" data-show-faces="false" data-colorscheme="light" data-action="like" data-href="http://www.nike.com/"></div>
gives the likes for that site. And:
<div class="fb-like" data-send="false" data-layout="standard" data-width="450" data-show-faces="false" data-colorscheme="light" data-action="like" data-href="http://www.facebook.com/nike"></div>
Gives the likes displaying for their FB page.
I believe the issue there is a misunderstanding of the platforms or possible confusion with semantics. Someone can 'like' content on your website via a widget which will share that like to their Facebook profile. Additionally, you can display the amount of likes your website's page has with a Facebook widget or AddThis widget.
However, if you share a page from your website's Facebook page and users can like that, however that will not increment the displayed likes in the widgets aforementioned. Hopefully that clears it up?
My website has a few Facebook like buttons on it, however the numbers doesn't really add up. There is one post with 18 likes, then there's the front-page-like with 8 likes and my facebook wall with 3 likes. Shouldn't these likes be combined? I think I'm using the OG tags correctly.
Website: Rushtips.com
Thanks in advance!
Edit:
I used this code:
<div id="facebook"><div class="fb-like" data-href="http://rushtips.com" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false" data-font="tahoma"></div></div>
Would using this code, make it count on my wall as well?:
<div id="facebook"><div class="fb-like" data-href="http://facebook.com/rushtipscom" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false" data-font="tahoma"></div></div>
If that's the case, all I need to know is how to do it with the posts, if it's possible.
It's not possible to add post-likes to the page-likes count, which I think should be done by default, anyway..
Using your Facebook page, instead of your own domain, as the data-href is the only way to get the same count on your wall as well as on the like-button.
In posts, you should use the default permalink of your site.
Hope it helps someone.
I have one site - example.com and ones mirror - example2.com. Both sites are completely similar and are established on one Jomla's base.
I have like bottom with ID to example.com and on the example2.com this bottom doesn't work (because of wrong ID).
Is it possible to solve this problem - to have two site names and wotking facebook like bottom?
Get rid of the ID and look into documenation on how to generate Like button. Here is Facebook Like Button API documentation/generator.
Like button takes URL as parameter. So simply do this:
Include the JavaScript SDK on your page once, ideally right after the opening tag. http://developers.facebook.com/docs/reference/javascript/
Place the code for your plugin wherever you want the plugin to appear on your page.
On Site #1:
<div class="fb-like" data-href="http://example1.com" data-send="true"
data-width="450" data-show-faces="true"></div>
On Site #2:
<div class="fb-like" data-href="http://example2.com" data-send="true"
data-width="450" data-show-faces="true"></div>
Or more dynamic:
<div class="fb-like" data-href="http://<?php echo $_SERVER['SERVER_NAME']; ?>" data-send="true" data-width="450" data-show-faces="true"></div>
Or Joomla Specific, get live_site configuration from config and display it:
$cfg -> reference to Joomla Config
<div class="fb-like" data-href="<?php echo $cfg->live_site; ?>" data-send="true" data-width="450" data-show-faces="true"></div>
The code below is placed in the header and called via php to every page of the website. (It's WordPress.)
The counter shows the like counts for the home page on every article. Any way to make it show the count for individual articles? (this is the site)
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1">
</script><fb:like href="http://GlamourUnderground.com" send="true" layout="box_count" width="55" show_faces="false" font="arial"></fb:like>
</div>
Thank you,
Tara
You have to put the permalink to the actual article in the <fb:like> tag, not just the home page.Try...
<fb:like
href="<?php the_permalink()?>"
send="true"
layout="box_count"
width="55" show_faces="false" font="arial"></fb:like>
This will work whenever you've called the_post(), e.g. on individual posts and pages and when you are in the "loop".
I am trying to use AddThis button on a web page of mine, which you can share, like (facebook), and tweet (twitter) -
the AddThis code is pretty straight forward below,
<!-- AddThis Button BEGIN -->
<div id="share" class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_counter addthis_pill_style"></a><!---->
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4cdb5be51dc49c98"></script>
<!-- AddThis Button END -->
but I don't understand - in the code above, where can I put the image or video url which I have uploaded and posted on my fb page? for instance the url below is the image from my facebook page that I want to track how many people like this picture through my website,
http://www.facebook.com/photo.php?fbid=10150115644909972&set=a.10150115644754972.329183.55239684971
I have read through the documentation on AddThis but it doesnt explain this at all!
http://www.addthis.com/help/client-api#configuration-sharing
It points me to this,
http://developers.facebook.com/docs/reference/plugins/like#
again, this is a Facebook plugin, no used within AddThis. If I am using the Like button from the Facebook API, then I cannot use the AddThis plugin above, can I?
furthermore, The Like button from Faebook API seems to work on the Facebook page, but not an individual picture or video I uploaded/ posted on my Facebook Page, for instance, I tried this on my localhost, the picture on my Facebook Page won't collect the number of likes even though I have clicked the Like button on my screen.
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://www.facebook.com/photo.php?fbid=10150115644909972&set=a.10150115644754972.329183.55239684971" layout="button_count" font="arial"></fb:like>
so my main doubt on the Like button itself - does it work on facebook only or does it apply to the individual picture/ video on my facebook page? I tried to find this answer from the facebook Like documentation but it doesn't explain anything about this.
it would be grateful if you have any idea. thanks!
Try this:
...
<div class="addthis_toolbox addthis_default_style"
expr:addthis:title='Photo'
expr:addthis:url='http://www.facebook.com/photo.php?fbid=10150115644909972&set=a.10150115644754972.329183.55239684971'>
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_counter addthis_pill_style"></a><!---->
</div>
...
See also: http://www.addthis.com/help/widget-sharing#tagging
You might get an error with the add this way to display the Facebook Like Button and IIS7.0.
I had the problem yesterday and have posted a solution here.
Hope this helps,
Covo