Determine first 50 likes via Facebook Graph API - facebook

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.

Related

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

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!

Retrieve all liked objects from Facebook Graph API

Is it possible to get a list of all liked objects using the Graph API? I want to save a list of any articles (ie. items with URLs) the user has liked (say, in the past week). I've tried:
/me/likes - this is liked pages only, not other items
/me/feed - this is posts by the user only, not others
/me/home - this might be possible, but seems to be deprecated
If I understand what you're trying to get correctly, you can probably use the /me/og.likes Graph API endpoint. You'll need the user_likes permission for this.
The /me/likes endpoint returns Facebook Pages that the user likes, while the /me/og.likes endpoint returns any posts/links that the user has Liked (i.e. performed an Open Graph Like action on).

Using single access token to get the 'likes' of other users

Using the normal Facebook website, one can get to a page showing which pages a user has 'liked'.
From the graph API, it is possible to get this for pretty much all pages, using graph.facebook.com/userid/likes?access_token=MYACCESSTOKEN.
However, I need to be able to do the same - i.e. get the list of pages a user has 'liked' for normal Facebook users (and not 'pages' who have 'liked' other pages).
Is this possible with the single access token? Judging by the fact you can get this info from the normal Facebook web page, I would expect it to be possible.
Privacy works slightly differently for applications accessing the API and for users accessing the actual site.
An application doesn't have access (by default) to your friends' likes to prevent data mining. In order to get a users friend's likes, you'll need to request the friends_likes permission.
You can read about this permission and others in the documentation.

Correlating users who "like" a page with users of an app

I have a page that links to my app. and this page has an increasing number of "likes".
We want to know how many of the FB users who have "liked" our page have authorized our app.
Per Querying Users who 'like' my Facebook Page, it doesn't appear that I can get the list of "likers" of my page in order to correlate the FB ids against my user base for the app.
Two questions:
1) Is there an existing Insights metric that I should be using to get this information? This does seem like a special kind of "conversion" (from page - liker to app - user).
2) The only other option I see is scraping the output of
https://www.facebook.com/browse?type=page_fans&page_id=PAGE_ID
which some have suggested violates the FB TOS (why is that, btw?). Does anyone have any other suggestions?
3) Upon further reflection, it occurs to me that I can come at this problem from the app instead. I should be able to get likes for my app users and see if my page is among them. Can anyone verify if this will work?
Many thanks,
Wes
No, you'd need to manually calculate this by using the user's access token when they're using your app to see if they like the page - Facebook's API will not give you a list of users of your app or a list of likers of a page

Facebook : List of all pages liked by

I am new to Facebook's Graph API and FQL. I want small information about the same.
I want to get List of all pages liked by any particular user.
I have used Graph API just to allow user to get logged in with their Facebook ID and Can access their wall but don't know much about rest of the this.
I searched on Google for same but got information about list of pages that user administrate that I don't want, I want full list which is like by them.
It's a connection property of the User object.
https://developers.facebook.com/docs/reference/api/user/#likes