繁体   English   中英

允许在用户墙上张贴Facebook帖子

[英]facebook post on user wall with permission

我正在使用下面的代码在我的朋友墙上发布。

这段代码的问题是,提示,当我单击“仅共享”时,但我希望将其发布在用户墙上,他已经授予了权限。

     function streamPublish(name, description, hrefTitle, hrefLink, userPrompt){
     FB.ui(
     {
     method: 'stream.publish',
     message: '',
     attachment: {
        name: name,
        caption: '',
        description: (description),
        href: hrefLink
     },
     action_links: [
        { text: hrefTitle, href: hrefLink }
      ],
      user_prompt_message: userPrompt
    },
    function(response) {

    });
     }
      streamPublish();

我尝试删除user_prompt_message但它仍然提示。

提前致谢。

您正在那里使用Feed对话框; 这将打开一个Facebook提供的对话框,供用户预览并确认内容,然后再发布到其供稿中。

如果您想使用publish_stream扩展权限直接发布到用户feed, publish_stream需要直接对/{USER ID}/feed进行API调用-请参阅https://developers.facebook.com/docs/reference/api/user /#feed了解更多信息。

只需记住,用户仍然需要同意代表他们所作的每条帖子,只是不需要您使用Facebook的feed对话框来这样做。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM