Skip to content

Instantly share code, notes, and snippets.

@cgallagher
Created March 11, 2011 11:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cgallagher/865787 to your computer and use it in GitHub Desktop.
Save cgallagher/865787 to your computer and use it in GitHub Desktop.
Create a wallpost for a target user using the FB JavaScript SDK
send_wall_post_to_user: function(idx, facebook_id, message, user_message, post_name, post_description, post_image, post_caption)
{
var params = {};
params['message'] = user_message;
params['name'] = post_name;
params['description'] = post_description;
params['link'] = 'http://apps.facebook.com/irelandville_dev/';
params['picture'] = post_image;
params['caption'] = post_caption;
FB.api('/'+ facebook_id +'/feed', 'post', params, function(response)
{
if (!response || response.error)
{
app.log(response.error);
app.log(response);
alert('Error occured');
}
else
{
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment