tags:

views:

486

answers:

1

Hi I have been looking for hours but cannot find the API call that retrieves a user's news feed (i.e the thing that you see at http://www.facebook.com/home.php). I think this should be something extremely easy. What did I miss?
I would prefer an answer with FQL, but other API methods will be just fine, as I think I can translate between them.

+1  A: 

I found it! The way is to look in the stream for post from users that are your friends. This is kind of annoying because it takes double the effort just to do some very basic task. In Objective-C using FBConnect the code look like this:

NSString *connections = [NSString stringWithFormat:@"select target_id from connection where source_id == %lld", _uid];
NSString *fql = [NSString stringWithFormat:@"select message from stream where source_id in (%@)", connections];
NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"query"];
[[FBRequest requestWithDelegate:self] call:@"facebook.fql.query" params:params];
phunehehe
do you get the same data that appears in http://www.facebook.com/home.php ? can you build the same page if you wish to?
shaimagz
yes you will get the same set of data, and yes of course you can :D if you can do ajax :D
phunehehe