Facebook: count number of unique users who shared a post - facebook

Is it possible to GET number of unique users who shared a post on a facebook fan page, remotely?
Basically I want to post a status update on my fan page. Next, for each time a fan shares the post, I want the count (of users who shared the post) to be updated on a separate web page. I know it's possible to get number of likes for a post, but how do I get the number of UNIQUE users who shared a post?

I believe you can do this with insights:
/PAGE_ID/insights?metric=page_storytellers_by_story_type
From what it looks like on my pages the user post value is the number of unique shares. The documentation isn't really clear on this though, so YMMV.

Related

Is there a way to count the number of times each individual Facebook Friend has liked your Facebook posts?

Iam trying get the number of times each individual liked my particular post.
It seems that it is possible to get the overall like count of a page.
But I dont need the overall like count. I want in specific data of a user who liked my posts.
I tried these links
How can I get fan page likes count using graph api?
Getting the Facebook like/share count for a given URL
How to get Facebook likes count for a Facebook page?
I am just writing the answer which is mentioned in the comment. Because that's the answer.
No, that is not really possible. Each of your friends would have to
sign in to your app and grant it permission to read their likes, and
you would need to have valid individual user tokens available for all
of them each time you want to request this data, because “A User or
Page can only query their own likes. Other Users' or Pages' likes are
unavailable due to privacy concerns.”
developers.facebook.com/docs/graph-api/reference/v3.3/object/

Get facebook share/engagement count

As a feature of our site, we are allowing users to share page(s) of our site on facebook by providing share button on our site.
We are adding users encrypted login id as part of the shared url in query param. say
www.somedomain.com/somepage.html?lid=user1
making the share url unique to each user who shares it.
where lid is the parameter namd and user1 is the encrypted loginid. we are also keeping the shared url/link in our system. So that later we can query to facebook using the url and get count of shares, likes and comments using facebook api.
https://graph.facebook.com/?id=www.somedomain.com/somepage.html?lid=user1&fields=og_object{engagement}
We are getting count of shares, comments and likes. But when a different user shares the same url, even though the url is different say
www.somedomain.com/somepage.html?lid=user2
And if I query to facebook api
https://graph.facebook.com/?id=www.somedomain.com/somepage.html?lid=user2&fields=og_object{engagement}
The count of shares, likes and comments of those two different urls (user1 and user2) are same.
If I comments on any one users share, and query on facebook api, the count increases on both apis ( for user1 and user2).
If I like on any one users share, and query on facebook api, the count increases on both apis ( for user1 and user2).
I think facebook ignores the query param lid=user1 & lid=user2 as part of id for any share link
and considers only the path as id i.e. www.somedomain.com/somepage.html? and counts are maintain against this id or path
My question is that:
Is it correct what I have explained above?
Is there any way to make same share link unique for different users? So I can get all types count of the share link of each users without conflicting each other users

Get FB likes count for specific URL and page

This is a two questions in one.
Is it possible to get the likes count to a specific page inside a website? As in if there's a like button without a specific target url, likes will be given to the address in the window.location.href; can this number be retrieved without an API key?
Is it possible to get the official Facebook page/page id if I only have the URL of the website? If i only have the URL / domain name (coca-cola.com), can I get the facebook page which is https://www.facebook.com/cocacola?
You can check the like count of a website by calling the Graph like the following:
https://graph.facebook.com/?ids=http://www.your-website.com/the-url-or-so
To your Question if you can get a Facebook Page if you are the owner of the Business:
Yes! Some times ago I've read an article posted by Facebook where this is described. If you are the owner of a company/business/brand you can ask facebook for the page transfer to your account. For that you must be the owner and your business is really large. When the names of the companies are the same you must have to one which is more popular.
Is it possible to get the likes count to a specific page inside a website?
If that page is in the Open Graph, yes.
Is it possible to get the official Facebook page/page id if I only have the URL of the website?
No, because there is no such thing. No one is obligated to have a FB fan page for their business, organization or whatever.

How to retrieve the shares of a status/photo with Graph API

I know it's possible to retrieve the 'likes' of a picture or status, e.g.: https://graph.facebook.com/id_of_your_status_or_photo?access_token=...
Then I have some info like the likes and comments, but no share info
You can get some basic info from an url like https://graph.facebook.com/?id=http://www.google.com
But I would like to know how you get the information of the people who've shared your photo or status.
To answer:
But I would like to know how you get the information of the people
who've shared your photo or status.
You are not allowed to know this, that would be an invasion of privacy. The closest you can do is to take an authenticated user's acess_token to your app and iterate thru their stream items until you find your link.
FYI, shares and likes are rolled up together into the like/share count.
Per the documentation:
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.

retrieve the amount of likes in a facebook page status

I would like to enquire whether or not it is possible to retrieves the numbers likes of a facebook fan page status or links or photos to be like?
if there is, must there be an apps for this or a simple social plugins?
the main thing i would to do is that, when USER A likes my website, the amount of likes will increased right? The link that USER A liked, would appear in USER A's wall. What would happen if their friends likes the post where USER A likes my website, can i add up to that likes too?
When you access the Post object in the Graph API it has the count and details for both the comments and the likes - e.g. http://graph.facebook.com/47764841579_10150344908236580