gpt4 book ai didi

facebook - 请求加入 Facebook Graph API 群组

转载 作者:行者123 更新时间:2023-12-03 06:22:38 29 4
gpt4 key购买 nike

我们开发了一个使用 Graph API 与 Facebook 交互的系统。在本例中,我尝试在群组中发布消息,并且得到以下返回:

我在此图中的请求:

v2.3/402998003100416/feed?message=hello

返回结果是这样的:

{
"error": {
"message": "Permissions error",
"type": "FacebookApiException",
"code": 200,
"error_subcode": 1376025,
"is_transient": false,
"error_user_title": "No Permission to Post",
"error_user_msg": "You do not have permission to post in this group."
}
}

很明显,问题在于该群组的隐私是“封闭的”,只有成员(member)才能发布,但我并没有要求参加该群组。我的意图正是如此,使用图表提交加入群组的请求,就像单击“+ Group Join”facebook 按钮本身一样。怎么做?

利用同样的方式,我想知道我是否可以享受图形 API 的一个粉丝页面。

最佳答案

应用程序只能邀请用户加入该应用程序创建的群组,您可以在文档中阅读:https://developers.facebook.com/docs/graph-api/reference/v2.3/group/members#publish

无法使用 API 向普通群组发送请求或邀请。

要在群组中创建帖子,您需要 publish_actionsuser_groups:https://developers.facebook.com/docs/graph-api/reference/v2.3/group/feed#publish

请记住,您很可能不会获得 user_groups 批准:

This permission is granted to apps building a Facebook-branded client on platforms where Facebook is not already available. For example, Android and iOS apps will not be approved for this permission. In addition, Web, Desktop, in-car and TV apps will not be granted this permission.

https://developers.facebook.com/docs/facebook-login/permissions/v2.3#reference-user_groups

编辑:Facebook 最近发布了一项新权限 user_management_groups,用于访问用户所属管理员的群组。

关于facebook - 请求加入 Facebook Graph API 群组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29403669/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com