繁体   English   中英

如何以编程方式在我的Facebook时间轴上发布?

[英]How can I post on my facebook timeline programatically?

我想在我的时间表上发布一个故事。

如何才能做到这一点?

您需要做的就是阅读以下内容:

http://developers.facebook.com/docs/reference/javascript/

从上面:

以下示例使用FB.ui()方法调用“订阅源”对话框,以允许用户将链接发布到其时间轴:

FB.ui(
{
   method: 'feed',
   name: 'The Facebook SDK for Javascript',
   caption: 'Bringing Facebook to the desktop and mobile web',
   description: (
      'A small JavaScript library that allows you to harness ' +
      'the power of Facebook, bringing the user\'s identity, ' +
      'social graph and distribution power to your site.'
   ),
   link: 'https://developers.facebook.com/docs/reference/javascript/',
   picture: 'http://www.fbrell.com/public/f8.jpg'
},

function(response) 
{
    if (response && response.post_id) 
    {
      alert('Post was published.');
    } 
    else 
    {
      alert('Post was not published.');
    }
 }

);

暂无
暂无

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

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