Display summery of likes from facebook page and web site - facebook

I want to integrate the number of likes that I have in my website with the number of likes that I have in my facebook application, so for example if user clicks on my site like button and another user click on my facebook page like, the total likes that I will see on both the applications(site and facebook) will be 2.
My question is is this possible at all or thous are 2 separate objects and it is not possible to sum there likes
Thanks

You can find the like count of your website by running the following FQL query:
SELECT like_count FROM link_stat WHERE url="yourwebsiteurl"
Then, you can get the like count of your app in one of two ways. If the like button for your app points to its apps.facebook.com address, use the same query as above, with its app URL instead of your website URL.
If the likes for your app are from a Page associated with the app then you should make a Graph API call to:
https://graph.facebook.com/YOURPAGEID?fields=likes
This will give you the like count for each object, now you just need to sum them.

Related

How to get the facebook user id that likes my website (not a facebook site)

I am making a raffle within the people that had make an "I like" to a certain article of my external website (non facebook). In order to choose the winner I need to know who has made the I like.
This query:
https://api.facebook.com/method/fql.query?query=select%20like_count%20from%20link_stat%20where%20url='myWEBSITE'&format=json
Only get me the total count of I Likes but not the users ID
This query is perfect:
https://api.facebook.com/method/fql.query?query=SELECT%20user_id%20FROM%20like%20WHERE%20object_id%3D%MY_object_ID&access_token=MY_ACCESS_TOKEN
But how do I get an OBJECTID for an external url??
Thanks in advance
Object can be any thing like video, note, link, photo, or album but can not be any FB page or Url.. So I guess its not possible to get the user Id for a URL.
If you are using JS SDK / Like plugin in your website to like it, i think you can subscribe to an event and then use some ajax calls to get those userIds whenever they instantly like it.
See Somnath Muluk's answer in https://stackoverflow.com/a/13467793/269521

Facebook Page likes

I know that the count that is shown by the Like button social plugin is made up of:
The number of likes of this URL
The number of shares of this URL
(this includes copy/pasting a link back to Facebook)
The number of
likes and comments on stories on Facebook about this URL
The number of inbox messages containing this URL as an attachment.
Does anyone know for certain if the Page like count, as accessible from this kind of call, is also made up of the above rules or is it a pure Like count only (i.e. only counts people clicking the Like button of the Page)?
Cheers!
Lee
For a Page, it's just the Like count that's displayed - that other list is for URLs in your website/app

Facebook Like Button Count not equal to total_count in link_stat

I want to display a Top 10 page in my Facebook App. Basically it's an App where you can vote for DJ Mixes. I select the top 10 urls form the link_stat table over fql and there is the problem: the values of the total_count column in the link_stat table are not equal to the values which are displayed besides the like button.
Check for example:
Like Button: http://www.beatpatrol.at/mix/1020
FQL Request: http://api.facebook.com/method/fql.query?query=SELECT%20share_count,%20like_count,%20comment_count,%20total_count%20FROM%20link_stat%20WHERE%20url%20=%20%22www.beatpatrol.at/mix/1020%22
At the time i wrote this, the like button shows 779likes and the total_count is 752.
Is there a way to get exactly the value from the like button, so that I can order on this value?
Note that:
What makes up the number shown on my Like button?
The number shown is the sum of:
The number of likes of this URL
The number of shares of this URL (this includes copy/pasting a link back to Facebook)
The number of likes and comments on stories on Facebook about this URL
https://developers.facebook.com/docs/reference/plugins/like/
To answer your question, neither the formula of likes nor the Like Button look like being configurable. In my opinion, there is definitely no way to get the exact value from the like button.
A user can turn off all platform apps and hide himself from all applications. It looks like 5 of your friends chose to turn that off.
The setting is under:
Privacy Settings > Apps and Websites > Apps you use > "Turn off all apps"
May be this can be the reason why the exact no of likes are not coming.

Querying Users who 'like' my Facebook Page and Get Profile Images of the Users?

I was looking out the solutions but no luck for getting the list the users who likes your Facebook page. I found out the following solutions over internet but all have some limitations. Please suggest??
Facebook provides like table where we can provide object name to get the list of users who likes your Album,Photo etc. But I didn't find to get this work for a Facebook Page. It is working for photo,album etc.
Second options with page_fan table but i notice that only the uid field is index able so you need to know the user id to search it and not the page_id.
Finally i added the Like Box in my applications where I am showing the list of user with their profile picture but here is also limitation with face book like box that i can't see the entire list of the users who likes the Facebook Page. It is showing only 20-30 in the Like Box. If i was trying to change the iFrame div CSS to overflow:auto but their is no success because i think iFrame with other domain url doesn't allow the same.
Can someone help me out how i can get the all Facebook User's profile photos who likes my Facebook page with any 3 options or let me know if any other options.

Facebook Like Count Discrepancies - Page vs. Button

there is a huge discrepancy between the number of likes our page has received and the number of likes displayed when using the like button, and giving it the facebook page's URL (like button is much higher). Does anyone know why this happens?
As described in the doc :
What makes up the number shown on my Like button?
The number shown is the sum of:
The number of likes of this URL
The number of shares of this URL (this includes copy/pasting a link back to Facebook)
The number of likes and comments on stories on Facebook about this URL
The number of inbox messages containing this URL as an attachment.
I am a Facebook Partner Engineer working on platform. To bring your Facebook page Likes to your web page you should use the Like Box rather than the like button. This will allow you to gain Facebook page likes from your website while also giving you the option to show your page's stream stories right in your web site.
You can find out more about the like box here:
https://developers.facebook.com/docs/reference/plugins/like-box/
I hope this helps!
Jonathan
My understanding is the like button aggregates likes, comments and other interactions.
Basically the counter next to the button isn't the like count but an activity or interaction count.
You can get the actual like count through the graph api if you need it.