Skip to content

Instantly share code, notes, and snippets.

@astein
Created April 9, 2014 00:46
Show Gist options
  • Save astein/10214319 to your computer and use it in GitHub Desktop.
Save astein/10214319 to your computer and use it in GitHub Desktop.
Facebook Share
// make this call when your SWF loads:
ExternalInterface.call('function(){ $("body").append(\'<div id="fb-root"></div>\'); window.fbAsyncInit = function() { FB.init({ appId:"4718162187", status:true, xfbml:true }); }; $.getScript("//connect.facebook.net/en_US/all.js"); return false; }');
// make this call when the user shares. replace with correct values
ExternalInterface.call('function(){ FB.ui({ method: "feed", name: "Mott\'s Fruit Drummer", caption: "#FlavorsThatRock", picture: "http://milodigital.socialvi.be/motts-fruit-drummer/share.jpg", description: "My kid rocks!"}); return false; }');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment