GET Facebook Page Fans - facebook

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...

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/

fb graph api multiple userid and page like

from my ios app after fb login, facebook returns me the userid.
i call https://graph.facebook.com/v2.8/me/likes/[pageid]?access_token=...
to check if the user likes my fb page. But i get empty array while the same user has liked my page from the web.
The user has different userId when logins directly to facebook website and different when logins in my app. While the user has liked my page from web , how can i see it in the api call from my app using the userid that fb returns me when he logins from my app?
Thank you very much
Please note that there is no direct way of checking whether a particular user has liked a certain page or not using FB Graph API.
But i believe there is a workaround for this and you can try to hit the below URL in your browser
https://www.facebook.com/search/<page_id>/likers?ref=about
It will return all the people information who have liked the page provided. I am not sure would this return all the results or just some of them. But i believe you can try this.
You can then do some web scraping which will help you indentify whether 'person A' has liked a page say 'abc'.
Now you can hit the below endpoint to retreive all the likes this 'person a' has liked
FB.api('/person_id_obtained_from_above/likes')
But please note that you need user_likes permission to retrieve someone else's likes
Let me know if this worked for you.

How to check if user is a fan of facebook page by Graph API?

I want to check if user is a fan of a specific Facebook page, I have tried searching in Google but I haven't found the answer yet.
I am an admin of fanpage. I am having a promotion program on my page and becoming a fan of my page is a requirement. I want to check if users like my page to give them presents. Because of a large users, I want to create a tool to do it.
Do you have any solutions? Thank you!
You would need to authorize the user with the user_likes permission. That way, you can get his Page likes with the /me/likes endpoint.
Be aware that you are not allowed to incentivize Page likes, users must like a Page only because they really want to, you can´t reward them in any way or gate content behind a Page like.
You can also use /me/likes/{page_id} where {page_id} is an actual page object id as a shortcut.
If the user doesn't like the page, you'll receive a response like
{
"data": [
]
}

How to track the users have became fans of my facebook page?

I know there is a Facebook tool named insights, but, at the moment it does not give me the information I need.
I would like to create custom invitation code to track how many friend of a specific user have became the fans of my page.
Small example...
John becames fan of my page, I would like to undersand how many friends of John became fans of my page.
I do not know how to do that, but I must need to know how many users have become fans and by whom.
Is this possible with a Facebook page, or do I need to create an application?
Thank you!
This can be done with FQL (Facebook Query Language) using the Facebook Graph API. What you're looking for is the likes attribute which can be obtained from the JSON returned by http://graph.facebook.com/yourusername.
Ofcourse you will need to do further queries to obtain things like how many friends of a specific user liked your page. Probably something along the lines of SELECT ... FROM like WHERE object_id = yourpage and I would imagine you'd need to link that to the friend table with something like WHERE uid1 = friendid to get their friends.

Facebook App : Who "likes" my application?

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.