[英]How to fetch a public page's posts using facebook graph api?
Can I fetch all the posts data from a page with logged in user's access token ? 我可以从具有登录用户访问令牌的页面获取所有帖子数据吗? or Is there any other way to retrieve all the posts data of a public page using Facebook Graph Api for Android ? 或者还有其他方法可以使用Android版Facebook Graph Api检索公共页面的所有帖子数据吗?
You will get facebook post data in json format that you can parse according to your requirement. 您将获得json格式的Facebook发布数据,您可以根据需要对其进行解析。
GraphRequest request = GraphRequest.newGraphPathRequest(
AccessToken.getAccessToken(),
"/YOUR_PAGE_ID/posts",
new GraphRequest.Callback() {
@Override
public void onCompleted(GraphResponse response) {
// Insert your code here
Log.d("raw response ",response.getRawResponse());
}
});
request.executeAsync();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.