【问题标题】:Posting a photo to the wall把照片贴到墙上
【发布时间】:2012-01-16 19:52:41
【问题描述】:

是否可以将照片发布到墙上(而不是为应用程序创建的相册)? 我想过遍历所有用户的相册并发布到名为“Wall Photos”的相册,但想知道是否有更优雅的方式?

谢谢

【问题讨论】:

  • 您想只发布任何图像,这将为图像打开一个外部 URL,还是希望图像像在 Facebook 相册中一样显示?因为第一个选项是可能的,但第二个是不可能的。

标签: facebook facebook-graph-api photos


【解决方案1】:

您可以使用 Javascript SDK 中的 FB.ui 方法。如果您提供图像的 URL 作为 linkpicture 参数。这将为具有图像、标题、标题、描述等的活动用户创建一个墙帖。图像和标题将链接到您提供的任何 URL。

FB.ui({
   method: 'feed',
   name: 'Name Goes Here',
   link: 'link to the image',
   picture: 'link to the image',
   caption: 'caption goes here',
   description: 'description goes here',
   properties: ''
   }, 
   function(response) {
       //You can check the response variable to see if the post has been created
   }
);

【讨论】:

    【解决方案2】:

    相册有一种类型,您可以在 Graph API 中请求 /albums 时看到,因此您可以检查此名称,而不是检查名称。

    【讨论】:

      【解决方案3】:

      最终使用了这里列出的方法https://developers.facebook.com/blog/post/526/。 首先上传照片,然后使用 object_attachment 链接到它。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-04-26
        • 1970-01-01
        • 2012-08-19
        • 2011-05-04
        相关资源
        最近更新 更多