Facebook权限:publish_to_groups,manage_pages,publish_pages

时间:2019-06-08 01:28:25

标签: facebook facebook-graph-api

我是Facebook api新手。我正在尝试发布到测试用户页面。我创建了一个测试应用程序,一个测试用户,将该用户的权限授予我的应用程序,并将该用户的权限授予了以下错误消息(publish_to_groups,manage_pages,manage_pages)中提到的我的应用程序。

为什么我收到以下错误。我已授予权限。我想念什么?

21:22:38.802 [main] c.r.l.SLF4JLogger.debug:60 DEBUG c.r.HTTP - Executing a POST to https://graph.facebook.com/me/feed with parameters (sent in request body): message=RestFB test&access_token=EAAFzDsp0IzoBACFcTvZC5tRLIVw0ODS5rR4thrApeCrSAaYiWubCDbXYXvitZA3MSISDZCPyZAgSnDZBNERJA98FuZAhP4t0ddCM4KdysGz24yTQsgxz8fzHMNW83La39FMD1XhZBXZBhpt5nZBxUbwPRwR5yLAKZBfyYsvvE3wZArXoXZAGiR4yZB6AZA3mEpDXHXMBQCX0p28YxZBwAZDZD&format=json
21:22:40.288 [main] c.r.l.SLF4JLogger.debug:60 DEBUG c.r.HTTP - Response headers: {Transfer-Encoding=[chunked], x-fb-request-id=[ApMKsvMTCF72dmY9HlOvbL9], x-fb-trace-id=[B1Jc2rUQsb2], null=[HTTP/1.1 403 Forbidden], Access-Control-Allow-Origin=[*], WWW-Authenticate=[OAuth "Facebook Platform" "insufficient_scope" "(#200) If posting to a group, requires app being installed in the group, and \\n          either publish_to_groups permission with user token, or both manage_pages \\n          and publish_pages permission with page token; If posting to a page, \\n          requires both manage_pages and publish_pages as an admin with \\n          sufficient administrative permission"], Connection=[keep-alive], x-fb-rev=[1000804814], Pragma=[no-cache], Date=[Sat, 08 Jun 2019 01:22:40 GMT], X-FB-TRIP-ID=[636717457], Strict-Transport-Security=[max-age=15552000; preload], Cache-Control=[no-store], x-app-usage=[{"call_count":0,"total_cputime":0,"total_time":0}], Vary=[Accept-Encoding], Expires=[Sat, 01 Jan 2000 00:00:00 GMT], X-FB-Debug=[GFpDj5TrYyv0tO22GT3pXixW4AYFI7Czp3Dqia+AXIUwrjuy6Vnh7GU8HpkW+YHwD4sZdb9VnL3NbeiJk6VocA==], facebook-api-version=[v3.3], Content-Type=[application/json; charset=UTF-8]}
21:22:40.289 [main] c.r.l.SLF4JLogger.debug:60 DEBUG c.r.HTTP - Facebook used the API v3.3 to answer your request
Exception in thread "main" com.restfb.exception.FacebookOAuthException: Received Facebook error response of type OAuthException: (#200) If posting to a group, requires app being installed in the group, and \
          either publish_to_groups permission with user token, or both manage_pages \
          and publish_pages permission with page token; If posting to a page, \
          requires both manage_pages and publish_pages as an admin with \
          sufficient administrative permission (code 200, subcode null)
    at com.restfb.exception.generator.DefaultFacebookExceptionGenerator$DefaultGraphFacebookExceptionMapper.exceptionForTypeAndMessage(DefaultFacebookExceptionGenerator.java:174)
    at com.restfb.exception.generator.DefaultFacebookExceptionGenerator.throwFacebookResponseStatusExceptionIfNecessary(DefaultFacebookExceptionGenerator.java:59)
    at com.restfb.DefaultFacebookClient.makeRequestAndProcessResponse(DefaultFacebookClient.java:987)
    at com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:909)
    at com.restfb.DefaultFacebookClient.publish(DefaultFacebookClient.java:460)
    at com.restfb.DefaultFacebookClient.publish(DefaultFacebookClient.java:485)
    at com.restfb.example.GraphPublisherExample.publishMessage(GraphPublisherExample.java:89)
    at com.restfb.example.GraphPublisherExample.runEverything(GraphPublisherExample.java:77)
    at com.restfb.example.GraphPublisherExample.main(GraphPublisherExample.java:69)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

0 个答案:

没有答案