3

is there any possibility how to fetch any specific type of posts from facebook news feed via graph api?For example on my news feed I have statutuses, links, photos, vidoes, and so on..I only want to get the ones with type=status over graph api..I have seen some get parameters in documentation, but nothing like ?type=link..So I have tried /me/home?type=link, but unsurprisingly it have not worked:D

So does anyone know how to do that?I can filter it in my PHP app, but then I need to get some further data..When I got 20 posts and only 10 would be statuses, I need to add the 10 remaiming? It is too possible, but I dont know how to do that:D

Please help..!Thanks!

3 Answers 3

4

Hey Sima, I understand exactly what you are talking about.

There is no way in Graph to do what you want (at least that I have found). I do exactly what you want using FQL and filters. You can filter the feed by photos, videos, a few other options.

1) query the filter_stream table to get list of filters.

SELECT name,filter_key FROM stream_filter WHERE uid=me()

2) Filter the feed.

SELECT xxx FROM stream WHERE filter_key='app_xxxx'

Reference: http://developers.facebook.com/docs/reference/fql/

Sign up to request clarification or add additional context in comments.

1 Comment

It appears that facebook now supports subqueries. You could use the following query: SELECT xxx FROM stream WHERE filter_key in (SELECT filter_key FROM stream_filter WHERE uid=me() AND name="Links")
1

https://graph.facebook.com/me/statuses?access_token=blablablabla

The list of connections is here: http://developers.facebook.com/docs/reference/api/user/

4 Comments

+1, take extra attention for the permission required for each specific piece of data you want, here it's read_stream
Yeach..I propably expressed myself not so good:)This will return MY statuses..But I want to get other people statuses..Like my news feed on facebook, when the "only status updates" filter is set on..
yeah so you just replace 'me' with their facebook username.
it might be because of my poor english, but you still don't understand..Introduce your (if you have one) facebook homepage..There you have your friend's recent statuses..But unfortunately too some photos, links and so on..And I need only statuses. Something like /USER_ID/home?type=status..The USER_ID/home returns an array containing the same data which are on my news feed..and there is the information if it's a status or anything other. So I can filter it in my PHP, but then I need to get any further data..Details are in my original post..
1

http://graph.facebook.com/<UID>/feeds?limit=20 (try this in your browser, replacing <UID> with a user ID, or username )

This will return all the wall feeds. If you want to limit it to only wallfeeds , i think you can do it programatically. You can figure it out by looking at the string.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.