发布到用户安装app的Facebook墙

时间:2011-02-21 10:47:11

标签: iphone facebook

有时,当安装了使用Facebook的应用时,会在用户的墙上发布一条帖子“用户已安装MyAppName for iPhone App”。这是怎么实现的?

1 个答案:

答案 0 :(得分:2)

使用发布流的javascript方法。

 FB.ui({
    method: 'stream.publish',
    message:'hello',
    attachment: {
      name: title,

      caption: "I'm running!",
      media: [{
        type: 'image',
        href: 'http://www.yoursite.com/',
        src: 'http://www.yoursite.com/images/working.jpeg'
      }]
    },
    action_links: [{
      text: 'Get your percentage',
      href: 'http://www.yoursite/'
    }],
    user_message_prompt: 'Tell your friends about your application:'
  });