Skip to content

Instantly share code, notes, and snippets.

@mjfreshyfresh
Created September 21, 2010 22:27
Show Gist options
  • Save mjfreshyfresh/590706 to your computer and use it in GitHub Desktop.
Save mjfreshyfresh/590706 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
function streamPublish_<%= entry.id %>() {
var attachment = {name: "BrandX Contest",
description: "Vote for my entry and create your own picture!",
href: "<%= url_for "entries/#{entry.slug}" %>",
media: [{
type: "image",
src: "<%= entry.amazon_public_url(:main) %>",
href: "<%= url_for "entries/#{entry.slug}" %>"}
]};
var action_links = [{"text":"BrandX Contest", "href":'<%= url_for_page_tab %>'}];
Facebook.streamPublish('', attachment, action_links);
return false;
}
</script>
<a href="#" onclick="streamPublish_<%= entry.id %>()">Post to my Wall</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment