How to get number of like, share, comment of post of Facebook, Instagram and Twitter? - facebook

I am making ios and android apps and I want to get number of likes, shares, comments of any post that is posted by particular user from his/her Facebook, Instagram and Twitter accounts.
Means how can we get number of like, share, comment of the particular user's post of Facebook, Instagram and Twitter?
Does Facebook, Instagram and Twitter APIs/SDKs support this?
Please provide any reference link to achieve this.

I'm not sure about twitter or instagram API's but facebook graph API allows you to do this, given that you have the necessary permissions.
You can always check the public data, your own posts and such..if you want to have access to the data of a particular users feed/posts they will need to provide you with that permission. (user_posts in this case)
As for the total count you can retrieve it by adding .summary(1) to the end of your query ex. for likes, comments and shares.
me?fields=posts{comments.summary(1),likes.summary(1),shares}
you can also limit the number of comments/likes/shares to zero so that you retrieve only the total count per post. If that is what you want simply ad .limit(0) before the .summary(1) ex. comments.limit(0).summary(1)
Shares however are different from comments/likes/reactions, you can only retrieve the count of shares from graph API therefore you do not need to provide anything other than the "shares" query to the post to recieve that.
Cheers!

Related

Facebook share through my website and get likes and shares count only?

I want to create a website where it would be crucial to be able to view the likes and shares of a specific post a user shares from the website.. Is this possible anymore? The flow would be similar to this:
User logs in through Facebook and grants user_posts permission
User then clicks a share button for a specific url with quote content and a hashtag
What I need after those steps are:
ID of the post from sharing
Count of likes, reactions and shares on that post
even better would be a webhook notice of likes/reactions/shares count.
Any ideas? I don't need any private data... just counts of likes/reactions/shares but it's not looking possible anymore.
https://developers.facebook.com/docs/apps/examples-platform-policy-4.4
Don't incentivize people to post content on Facebook, or give the
impression that posting to Facebook will be rewarded
Incentivizing users for posting/sharing something on their personal wall is not allowed, you would not get the user_posts permission approved for that, and that makes it impossible.

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 impression or hit statistics on Facebook feed posts

Is there any way to get figures on the number of impressions, hits, or number of users that a particular Facebook post that is not part of a Page has been seen by?
To paraphrase, let's say that I make a post on my personal Facebook account, can I use the API (or another method) with my own access token to look up how much visibility this post has received?
The Insights APIs seem to be restricted to posts that are on a "Page", which from what I can see is distinct from a user's personal profile or feed.
Exactly, post insights are available for page posts only.
There isn’t a similar thing for posts on user timelines.
(If you are sharing content from your own domain, then Domain Insights might be able to give some data.)

How can I get the details of all fans of a Facebook page?

Suppose that I am the administrator of a Facebook page, I want to get all of the profile details of a the people who "liked" my page. Is this possible? How?
So far, I have only been able to get aggregated data through the Graph API. For example, "number of like in the past week".
There are posts that claim that I can do this with the FQL API, but the documentation for the FQL seems to have been hidden on FB developer site.
FQL reference is not "hidden", it's here: https://developers.facebook.com/docs/reference/fql But there's no current official way to get the profile details of your Page's liker, because you'd need the permission to query the user data from the users.
There are some "hacks" as denoted at Facebook API: Get fans of / people who like a page for example, but it's strongly advised that you don't use these. Facebook forbids scraping for example, and once Facebook changes its website, those methods are likely to stop working.

Determine first 50 likes via Facebook Graph API

Is it possible to get for example the first 50 people who liked a post, photo, whatever I created on facebook via the Graph API? Is there any kind of order when accessing connections like /likes or /comments?
Use the following link (given that you have permissions to access to the post):
/likes?limit=50
This should be the first 50 likes ordered via Facebook (usually based on time).
ASFAIK, you cannot get a list of people who like a page. It's a privacy issue. If you wanted to create an app, and users authorized your app, then you could get a list of the current users friends who like the page.