Can I get facebook unique share count? - facebook

I can get the page's share (click) number in the link-stat table using FQL.
What I want to know is the unique share number, in other words can I get
the number of users who share (group by Uid) the page.
Thanks in advance,
Onder

This is not possible as the link_stat table is user independent. The closest approximation would be to use the regular count
SELECT share_count FROM link_stat WHERE url = A

Related

How to get all people who liked Facebook post?

I have FB post
I can click "77 people like this" and get all people I needed.
Question: is there way to get these people by FB API ?
PS I want to get 3 random names from these list so I need to have these people in JSON format
It's easy to do with FQL. This gets you three random ids of people who liked this event
SELECT user_id FROM like WHERE object_id = 336638873112346 ORDER BY rand() LIMIT 3
If you wanted to get their names instead, you'd rewrite the query like this:
SELECT uid, name, username FROM user WHERE uid IN
(SELECT user_id FROM like WHERE object_id = 336638873112346 ORDER BY rand() LIMIT 3)
I'm one of the co-founders of Kither, a platform for checking all of your Facebook stats. We have added many features which requires to fetch all of our user's posts likes.
As of August 6, 2016, FQL is deprecated.
Facebook's Graph API's still available and you can call https://graph.facebook.com/{api-version}/{post-id}/likes to get likes on posts. But remember, Facebook uses pagination on likes if there are more than 1,000 of them.
Now, In this case you'll need to call the next page url.
You'll need to call the next url unless you've got all the likes. (you won't find any next field if there are no more likes)
To get how many people have liked that post (i.e. count), you don't need to page through results. You can simply use https://graph.facebook.com/{api-version}/{post-id}/likes?summary=true and you'll get an extra field containing all likes' summary, including their count.
Same can be done with comments and recently added, reactions.

Facebook count likes generated for an external site

We have references to other companies on our website and provide the option for people to 'like' them. After a quick skim of the Facebook documentation, I can't work out how to calculate the number of likes our website generates for others so we can measure our effectiveness. Is this possible?
Thanks
The easiest way to get this from the graph api for example https://graph.facebook.com/http://www.google.com there you can find the total number of likes and comments
You can subscribe to "edge.create" and count user likes of any like button on your site.
http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/
There is another source (website or something) that have a like button with the same url? if not, you can query link_stat table using FQL to know the number of likes of a url. if yes, I think that the only option is to store the likes count in your website code, in a database or something.

facebook like button

How to get the number of Likes in facebook like button?
Here is my scenario, I have five like buttons, I want to sort the buttons based on the number of likes. Is it possible?
You can get number of likes for any URL by running FQL on link_stat table:
SELECT like_count, url FROM link_stat WHERE url IN("FIRST_SHARE_URL","SECOND_SHARE_URL") ORDER BY like_count
then display buttons in corresponding order.
There is a button_count settings which once specified, will display the counts to the right of the button.
More Info:
Like Button

Query number of users that like a page in facebook?

If I put a facebook like button on a webpage, can I use FQL to query the number of users that 'liked' the page?
Yep. Try the following FQL:
SELECT like_count FROM link_stat WHERE url="http://your-web-page-url";
There's more stats available from the link_stat table as well. The table reference is here.

How to know how many users "like" something [facebook]

How to get how many times specific object was liked?
Answer: http://developers.facebook.com/docs/reference/fql/link_stat
and
How to get the most liked links in my application?
UPD 3: another question then: how to get the object_id for given liked page
Answer: object_url fql table
You can use a SQL (FQL) query and then count the users who liked the object. Heres information on the query: http://developers.facebook.com/docs/reference/fql/like