Facebook App : Who "likes" my application? - facebook

Is there a method to obtain, via facebook; a list of all users who liked "your" (or a specific application by id) application? via andy of the available methods, e.g. FQL etc.

Use the GraphApi to get at this information:
https://graph.facebook.com/me/likes
https://graph.facebook.com/--user
id--/likes
Search through the person's likes until you find your application id.
More details here:
http://developers.facebook.com/docs/reference/api/user

Facebook won't tell you who likes your page, just an aggregate total number.
Note: for privacy reasons it is not possible to query for all users
who like a Page.
http://developers.facebook.com/docs/reference/fql/like/

The Graph API allows you to query a Facebook Page's "members". I'm not sure if a member is the same as a liker or fan, but it's worth a shot.
http://developers.facebook.com/docs/reference/api/page
For some reason, they limit the result set to 500.

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!

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.

How to get insights on a Facebook fan page without user login

I'm trying to figure out how to get the total number of comments, posts, likes and fans for any given Facebook fan page and date range using the Facebook API's. I need to be able to do this without the user having to log into Facebook to give the app permissions. This does seem to be possible, as this site is able to do it https://app.conversocial.com/profiler/ .But I don't know how they are doing it.
I've looked into the 'insights' fql table, but this always seems to return empty results. And I've also looked into the 'link_stats' fql table but this doesn't allow a date range to be set.
Does anyone have any idea on how to do this?
You are right. What they are doing is not possible by using the normal Graph API or/and the FQL.
However, Facebook also provides support for two other APIs:
Public Feed API
Keyword Insights API
Access to these APIs is restricted to a limited set of media publishers and usage requires prior approval by Facebook.
I think that they are using the Public Feed API. The documentation of the Public Feed API lists some of the publishers that have been using this API and the site you've mentioned in the question is not in the list. The documentation also doesn't mention anything about getting the Page Insights, but I think it might support this feature (as I see no other way of doing it).
Or, they might be using any other such restricted API which is not yet available to the public and not even documented on the developers website, but is currently in beta/testing phase.
To get the number of fans and the talkabout count, just query the appropriate Open graph ID for the relevant page. For example, for Coca Cola (https://www.facebook.com/cocacola) this is done via
https://graph.facebook.com/40796308305
To get all public infos (Posts etc) use the following request
https://graph.facebook.com/40796308305/feed?access_token={ACCESS_TOKEN}
where {ACCESS_TOKEN} can either be an App Access Token or a personal one. Consider that you can only see public entries.
The ability to query the date ranges is not provided via Facebook ad far as I know. I guess the https://app.conversocial.com/profiler/ application queries each page that is in its index once a day, and saves the results. That's how they're able to provide historical data.
You can try with the following FQL queries or graph API requests for facebook pages,
Graph API
http://graph.facebook.com/nb4cinema
FQL
SELECT name,about,description, fan_count,talking_about_count FROM page WHERE username= 'stackoverflowpage'
In case of FQL tables:
To read the page table you need
no access_token to get public information, or information about public pages that are not demographically restricted.
any valid access_token to get all information about a page that the current session user is able to see.
We have a test fan page. This has poor figures (<10 fans). Statistics are not available due to the lack of fans and likes on that page.
Allthough, conversocial spits out some statistics. They mixed fans and likes to some extent and so my impression is, that they simply parse the page code in order to get what you see.

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.

GET Facebook Page Fans

I'm trying to get a list of all my Facebook Page Fans.
All I can get from FQL is the total amount of fans for my facebook page. I can't know WHO my fans are?
I have tried this:
https://graph.facebook.com/somepage
Anyone with an idea of how to know WHO my fans are? I.e. list the User IDs of all my fans for a specific page?
I also know that I can get more information about my fanpage using FQL and "insights", from there I can get "page_active_users" and so forth, but not a list of all my fans?
I know that Facebook doesn't support this (in public), but any ideas on how to get around it?
https://graph.facebook.com/[PAGEID]/members?limit=500&access_token=[oauthtoken]
Its not possible to get the UIDs of the users who have liked your page.
The UIDs of users are only available to third parties if the user performs a public action (post, comment or like on your page's feed), or if they auth an application.
This is why you can't query FQL with a page ID and get UIDs.
Its no more possible, thats why FB makes money ;-)
You can try to parse the AJAX call...