Created
March 17, 2010 20:41
-
-
Save bryfox/335701 to your computer and use it in GitHub Desktop.
Basic Facebook stream publishing with an image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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