分享到Facebook墙,没有弹出对话框 [英] Share to Facebook wall without pop up dialog
问题描述
我正在Rails中构建一个Facebook应用程序,其中一个用户创建一个条目并将其提交到其他用户的条目集合中-我要做的是将指向该条目的链接自动共享到用户的墙上在提交时,但如果没有弹出对话框窗口,我就无法理解Graph API文档来做到这一点.有人可以帮忙吗?
I'm building a Facebook app in Rails, where a user creates an entry and submits it into a collection of entries from other users - what I would like to do is have a link to that entry automatically shared to the user's wall on submit, but I can't make sense of the Graph API documentation to do that without a dialog window popping up. Can anyone help?
提前谢谢!
推荐答案
您可以使用Graph API POST
到用户的feed
. 文档在此处.您需要在用户登录时向其请求publish_stream
权限.
You can POST
to a user's feed
using the Graph API. The documentation is here. You need to request the publish_stream
permission from your user when they log in.
在这种情况下,您的URL将为:https://graph.facebook.com/USERNAME_OR_ID/feed
,如果要在马克·扎克伯格的墙上张贴,USERNAME_OR_ID
将等于zuck
或4
.查看 Net:HTTPSession 在Ruby中发布.
In this case, your URL will be: https://graph.facebook.com/USERNAME_OR_ID/feed
where if you were going to post on Mark Zuckerberg's wall, USERNAME_OR_ID
would equal zuck
or 4
. Check out Net:HTTPSession to POST in Ruby.
这篇关于分享到Facebook墙,没有弹出对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!