Facebook Graph API - 作为群组在群组墙上发布
我正在尝试通过 Graph API 发布到 Facebook Group Wall。当我发帖时,帖子的所有者被设置为我的个人 ID。有人知道如何让群组拥有该帖子的所有者吗?下面是我当前的代码:
form_fields = {
"message": 'This is message title',
"link": 'http://facebook.com',
"name": 'This is message title',
"access_token": 'token here'
}
form_fields['description'] = 'This is message body'
form_data = urllib.urlencode(form_fields)
response = urlfetch.fetch( url="https://graph.facebook.com/%s/feed" % group_id,
payload=form_data,
method=urlfetch.POST,
deadline=10
)
I am trying to post to Facebook Group Wall via Graph API. When i make the post, owner of the post is set as my personal id. Would someone know how to make Group has the owner of the post. Below is my current code:
form_fields = {
"message": 'This is message title',
"link": 'http://facebook.com',
"name": 'This is message title',
"access_token": 'token here'
}
form_fields['description'] = 'This is message body'
form_data = urllib.urlencode(form_fields)
response = urlfetch.fetch( url="https://graph.facebook.com/%s/feed" % group_id,
payload=form_data,
method=urlfetch.POST,
deadline=10
)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你做不到。这是组和页面之间的区别之一,在页面中,当您以管理员身份发布帖子时,帖子的用户是页面而不是您的用户 ID,因此您无法使组成为所有者使用 Graph api 的帖子。请参阅此链接 http://www.facebook.com/help/?page=904 并搜索问题“页面与群组有何不同?”。
You can't do it. That's one of the differences between the group and pages, in a page when you do a post as an admin the user of the post is the page and not your userid, so there is no way that you can make a group to be the owner of a post using the Graph api. See this link http://www.facebook.com/help/?page=904 and search the question "How are Pages different from Groups?".