如果发布到群组,则需要在群组中安装应用程序,并且具有用户令牌的 publish_to_groups 权限

问题描述

我正在尝试通过业务应用类型 facebook 向我的群组发帖,但出现以下错误:

Fatal error:  Uncaught Facebook\Exceptions\FacebookAuthorizationException: (#200) 
If posting to a group,requires app being installed in the group,and \
either publish_to_groups permission with user token,or both pages_read_engagement \
and pages_manage_posts permission with page token; If posting to a page,\
requires both pages_read_engagement and pages_manage_posts as an admin with \
sufficient administrative permission

我在登录时已经请求许可(我正在使用 facebook-php-sdk 和 facebook graph api v2.10):

  $permissions = ['email','publish_to_groups' ];
  $loginUrl = $helper->getLoginUrl('mydomain/fb-callback.php',$permissions);

我转到 https://developers.facebook.com/tools/debug/accesstoken 并查看我的 access_token 的结果:访问令牌信息

enter image description here

所以我认为问题是我的应用程序没有安装在组中。我发现了一个类似的线程 Facebook API - How to add application to group in developer mode,但在这个答案中,只是说如果我是应用程序和组的管理员,那么它会起作用,但它仍然返回上述错误。现在我什至无法在个人(设置 > 应用程序)和我的组(我的组 > 设置 > 应用程序)中找到这个应用程序。任何人都可以帮我解决这个问题,请提供线索或教程来创建 facebook 应用程序帖子以进行分组吗?谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)