如何使用 Facebook Graph API 分享某人的帖子 [英] How to share someone's post using Facebook Graph API
问题描述
我的 Facebook 应用在用户墙上发布消息.我想在我的墙上分享这些消息,就像我在用户消息下单击共享操作一样.我如何使用 Facebook Graph API 做到这一点?
是的,您可以使用 graph2 api 进行共享.你这样做的方法是使用 /feed
edge 并传递你想要作为链接分享的帖子的 url.
POST/v2.2/{page-id}/feed HTTP/1.1主持人:graph.facebook.com链接=https://www.facebook.com/{page_id}/posts/{post_id}
对您分享的帖子的标准 Facebook 权限确实适用.
My Facebook App posts messages on user wall. I want to share this messages on my wall, same as I click share action under user message. How can I do it using Facebook Graph API?
Yes, you can share using the graph2 api. The way you do it is to use /feed
edge and pass the post's url that you want to share as the link.
POST /v2.2/{page-id}/feed HTTP/1.1
Host: graph.facebook.com
link=https://www.facebook.com/{page_id}/posts/{post_id}
Standard Fb permissions to the post you are sharing do apply.
https://developers.facebook.com/docs/graph-api/reference/v2.2/page/feed
This was done today, in a local rails app, using FbGraph2 gem, with the above method.
这篇关于如何使用 Facebook Graph API 分享某人的帖子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!