Skip to content

Instantly share code, notes, and snippets.

@cgallagher
Created March 2, 2011 09:19
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/850679 to your computer and use it in GitHub Desktop.
Save cgallagher/850679 to your computer and use it in GitHub Desktop.
Generate a simple feed form using the Facebook JavaScript SDK
show_feed_form: function(share_message,share_name, share_caption, share_description, share_image_href, share_image_src, share_action_link_text, share_action_link_href, share_user_message_prompt, share_href, callback)
{
var publish = {
method: 'stream.publish',
message: "",
attachment: {
name: share_name,
caption: share_caption,
description: (
share_description
),
href: share_href,
media: [
{
type: 'image',
href: share_image_href,
src: share_image_src
}
]
},
'user_message_prompt': share_user_message_prompt,
action_links: [
{ text: share_action_link_text, href: share_action_link_href }
],
user_prompt_message: 'Share your thoughts'
};
FB.ui(publish, function()
{
callback();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment