CastToInteger
CastToInteger

Reputation: 521

Post to facebook wall that user installed app

Sometimes when an app utilizing Facebook is installed, a post saying "User has installed the MyAppName for iPhone App" is posted to the user's wall. How is this achieved please?

Upvotes: 1

Views: 436

Answers (1)

Awais Qarni
Awais Qarni

Reputation: 18016

Use the javascript method of publish stream.

 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:'
  });

Upvotes: 2

Related Questions