Skip to content

Instantly share code, notes, and snippets.

@bryfox
Created March 17, 2010 20:41
Show Gist options
  • Save bryfox/335701 to your computer and use it in GitHub Desktop.
Save bryfox/335701 to your computer and use it in GitHub Desktop.
Basic Facebook stream publishing with an image
var attachment = {
name: "Name (shows as linked text)",
href: '<%= link_to_app("models/#{@model.id}") %>',
description: "Relatively short description",
media:[
{ type: 'image',
src: '<%= @model.amazon_public_url %>',
href: '<%= link_to_app("models/#{@model.id}") %>'
}
]
};
var action_links = [{"text":"Click here!", "href":'<%= link_to_app("models/#{@model.id}") %>'}];
Facebook.streamPublish("", attachment, action_links);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment