graph api - retrieve list of likes of a page - facebook

I've been searching & found it's probably not possible.. but I thought I'd ask anyway:
I have this facebook page & I'd like to display the user-images(=avatars) of everyone who liked my page. I think it's really strange this isn't possible using the facebook API!
So basically I need to retrieve a list of users who liked my page. Something like this: (yet likes doesn't exist).
https://graph.facebook.com/page_name/likes?access_token=token
If I'd use the simple facebook plugin - it does display user images of people who liked my page.; so how come the plugin can retrieve these images but API can not ?
Any help is much appreciated!
thanks in advance,
Ben

There isn't an API call or FQL query you can call to get the list of users who like the page. Facebook has prevented this type of call for privacy reasons. You should stick with using the plugin instead.

Related

Facebook Graphic API 2.8: Get page posts by date/keywords?

I want to get a page's posts by facebook graphic api(2.8, without FQL),
I have page_id, so I write something like this on graphic api testing page:
{post-id}/feed?limit=100
I know facebook only allow we get 100 posts,
is there any other way to get maybe number 101~200 posts?
or setting a keywords parameters like
{post-id}/feed?limit=100&keywords=apple
or setting a date duration parameter like
{post-id}/feed?limit=100&date=20160101_20161231
I only use graphic api testing page, so if it don't have to write any other codes, it will be very nice.
Thanks
You can limit your result with until and since like this
me?fields=feed.since(2016-12-20).until(2016-12-25).limit(4)

How to get all user's likes using facebook's graph API

How can I query facebook's graph API to retrieve all user's likes (not only pages but also photos and others)?
For instance, how could I get all the pictures a user has liked? Using facebook's search bar you can find them easily by clicking on "photos has liked".
I wrote a script that scrapes the page content and does that but it's not very efficient.
I have recently come accross a similar problem, maybe this helps you solve it.
https://graph.facebook.com/v2.5/{page_id}/feed?fields=likes.limit(1).summary(true)&since={start_date}&until={end_date}&access_token={access_token}
This will give you a list of all posts that received likes during the specified time period. If you manage to write a code summing up the following JSON path you got your sum for "all user's likes":
data[0].likes.summary.total_count
Not entirely sure is this is exactly what you were searching for, hope it helps you though - and if not you, someone else.
As for likes you can also use the same way to extract Shares and Comments:
Shares
https://graph.facebook.com/v2.5/{page_id}/feed?fields=shares&since={start_date}&until={end_date}&access_token=
Comments
https://graph.facebook.com/v2.5/{page_id}/feed?fields=comments.limit(1).summary(true)&since={start_date}&until={end_date}&access_token=
Best regards
There isn't to my knowledge any way to get this from the API without grabbing every type of response from the API and then sorting through for likes. Facebook search bar uses an internal API different from the Graph API.

Is it possible to test if some page has facebook like button?

I have authorized Facebook app, that is, ability to use FQL.
I have to know if some url in the internets have facebook like button. I've read the manual and don't find anything that helps me. Have I missed something?
I suppose you need to scrape the page and look for the related Facebook tags. Another thing that may work is checking the page against the Facebook graph end-point like so (example 1 - 2):
http://graph.facebook.com/PAGE_URL_HERE
http://graph.facebook.com/http://www.masteringapi.com/
http://graph.facebook.com/http://www.masteringapi.com/tutorials/how-to-use-facebook-registration-plugin-as-your-registration-system/15/
If fields like likes or shares is present then maybe a like button is there. Yet that also could mean that someone just posted the link on Facebook.

Facebook - syncing comments social plugin with comments on object's?

Currently i am adding the social plugins to my site. Specifically to my photo albums. To generate the albums i am using fql to grab all the albums from a certain page. So it then occurred to me that people will be commenting inside of facebook but the social plugin will only show comments for the url not for the photo's object inside facebook. I know i can get the object_id from the fql. Is there a way to link the two together so if a user comments on either my site or facebook it will be all included.
So i am a little stumped i looked around the graph api for quite some time with no luck so anybody have any ideas? :\
cheers guys
So there isn't currently a plugin that lets you put an Object_id into and it will grab all of the comments out for that object.
You will need to use the graph api and if the album is public then you will not need a oauth code to access the comments. Once you have this object just convert it to a a stand-object array and do what you will with it ;)

Ways to query Facebook Graph "do I like x?"

I'm setting up my app to basically do what the FBML 'like' button does: like, unlike and show like count, for objects from the user's "me/home" stream.
I have no problem doing any of the above functions, but I'm having a very tough time getting the api to tell me if the user likes the thing already (so I can set the button to 'unlike'). The graph api is telling me I'm not allowed to search user's likes. Is there an FQL solution?
Thanks
There is like table where you can check through FQL if someone likes something.