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

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)

Related

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.

graph api - retrieve list of likes of a page

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.

Show tagged images from facebook on website?

I am trying to achieve similar functionality to the one shown here...http://blackmilkclothing.com/collections/leggings/products/circuit-board-grey-leggings
there fan page https://www.facebook.com/blackmilkclothing allows people to hash tag a photo and then populate it on their website like the link above.
Loading a series of tagged images from my facebook fan page to my website. I am not positive how this is acheived? I am assuming some kind of api process but any help in the right direction would be appreciated.
Thanks! All help is appreciated
See the 'tagged' connection of a Page in the Graph API: https://developers.facebook.com/docs/reference/api/page/
It returns a list of objects the page is tagged in, including photos
If you need background knowledge I suggest these links in particular:
Graph API overview: https://developers.facebook.com/docs/reference/api/
Page login: https://developers.facebook.com/docs/authentication/pages/
After a good bit of trial and error I've found the most efficient way to query photos tagged to a particular Facebook page is to use Facebook's FQL interface to retrieve a list of stream posts.
With FQL you can limit the queried objects to only those posts containing images (unlike with the higher-level Graph API calls which will return all posts, many of which may not have associated photos), and you'll also have more granular control over composition of the result set.
Keep in mind that Facebook doesn't have true hashtag support (only Facebook pages can be tagged), so to simulate the hashtag support that Black Milk Clothing encourages, you'll need to parse and filter the photo message text yourself.
As an alternative quick and easy solution, I've rolled the results of my efforts into a free online service called TagTray -- with TagTray I've added an interface for building and curating hashtag based galleries from Facebook, Instagram, and TwitPic (including application-level Facebook hashtag filtering) that can be framelessly embedded into a site with a few lines of JavaScript.

How can I use Facebook Graph API to get my site's recommendations?

I want to add a like/recommendation button to my site. Then, I want to be able to use the Graph API to query the recommendations for my domain (e.g. 17 people liked mysite.com/thisawesomepage)
There is a plugin that does this: http://developers.facebook.com/docs/reference/plugins/recommendations,
but I want to be able to retrieve the raw data.
Is this possible?
you just need the 'like_id' of your site. you can get it by liking it and looking at your list of likes through the graph api or however else.
then you just put it in a url like this:
https://graph.facebook.com/125086767519561
125086767519561 is the id of the The Glamourist, and you can see that it has been liked 198 times at the time of this writing.

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.