Is there no way available for retrieving posts usi

2019-07-28 18:40发布

I'm trying to use GraphAPI for retrieving various posts using a search query/keyword from Facebook.

This is what I tried:

new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/search?q=solareclipse&type=post",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();

but I got this error:

{
  "error": {
    "message": "(#11) This method is deprecated",
    "type": "OAuthException",
    "code": 11,
    "fbtrace_id": "AZD1YH0em2M"
  }
}

Has Facebook completely taken back the privilege of searching through it's public posts or is there some other way available?

1条回答
乱世女痞
2楼-- · 2019-07-28 19:08

Since Graph API v2.0 it is no longer possible to search through public posts.

There is a public feed API (https://developers.facebook.com/docs/public_feed), however the access is limited to certain media companies only.

查看更多
登录 后发表回答