English 中文(简体)
Retrieve news feed using facebook API
原标题:

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.

最佳回答

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];
问题回答

https://graph.facebook.com/me/home

Note: /me/home retrieves an outdated view of the News Feed. This is currently a known issue and we (Facebook) don t have any near term plans to bring them back up into parity.

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

the first example is how to properly get the news feed.





相关问题
C# Networking API s [closed]

Lately I ve been looking for a good networking API i could possibly use and/or reference some of the code within, but i have mere luck searching for some on Google/Bing. Hopefully somebody here has ...

getting XML from other domain using ASP.NET

I m fairly new to ASP.NET. And I was wondering how I could go about getting xml from a site (Kuler s API in this case), and then post the result using AJAX? So what I want here, is to be able to do a ...

Most appropriate API for URL shortening service

I ve just finished an online service for shortening URLs (in php5 with Zend Framework); you can enter an URL and you get an short URL (like tinyurl and such sites). I m thinking about the API for ...

UML Diagram to Model API

I need to create a diagram to document a RESTFul API that build, which UML diagram should I use? Thanks in advance,

How best to expose Rails methods via an API?

Let s say I have a model foo, and my model has a publish! method that changes a few properties on that model and potentially a few others too. Now, the Rails way suggests that I expose my model over ...

简讯

我是否可以使用某些软件来建立简便的航天国家服务器,最好是在 Java? 所有我都希望我的航天国家服务机在任何要求中都用同样的IP地址来回答。

About paypal express checkout api

In this picture,there are 3 main steps:SetExpressCheckout,GetExpressCheckoutDetails and DoExpressCheckoutDetails,I m now sure SetExpressCheckout is to be called by myself,what about ...

热门标签