如何获取Facebook粉丝页面Feed

时间:2016-05-05 06:20:27

标签: android facebook facebook-graph-api

我希望在没有用户登录和没有访问令牌的情况下获取粉丝页面新闻/ Feed。在this问题中,我发现您不需要任何访问令牌。如果你有App-ID和App-Secret。此解决方案适用于浏览器,但不适用于Android应用。 这是我的代码示例:

        new GraphRequest(null,
            "https://graph.facebook.com/{group_id}/feed?access_token={app_id}|{app_secret}",
            null,
            HttpMethod.GET,
            new GraphRequest.Callback() {
                @Override
                public void onCompleted(GraphResponse response) {
                    Log.d("Facebook_feed", response.toString());
                }
            }).executeAsync();

我的回复:

{
Response: responseCode: 400,
graphObject: null,
error: {
    HttpStatus: 400,
    errorCode: 190,
    errorType: OAuthException,
    errorMessage: Invalid OAuth access token signature.
}

}

为什么会这样?

0 个答案:

没有答案