我遵循了下面的步骤:https://developers.facebook.com/docs/guides/mobile/#android,但我真的不明白如何使用Graph API来获取安卓系统的页面流(只有新闻)。
有人能给我举个例子吗?我也找不到一个真正好的使用谷歌在线搜索的例子。
发布于 2011-07-21 04:01:18
有一个很好的Graph API explorer here,获取页面信息很简单,只需使用带有页面id的GET请求即可。
https://graph.facebook.com/<PAGE_ID> 因此,您可以使用简单的示例here
//Page id for Bristol (my hometown) but could use something like 'cocacola'
String PAGE_ID="108700782494847"
mBristolPageButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
//get the request aysn and process JSON response with the Listener
mAsyncRunner.request(PAGE_ID, new MyPageRequestListener());
}
});要从页面获取提要/新闻,请将/feed放在末尾,不过,您可能需要一个auth_token来获取新闻流
https://graph.facebook.com/<PAGE_ID>/feedhttps://stackoverflow.com/questions/6607745
复制相似问题