Skip to content

Instantly share code, notes, and snippets.

@cgallagher
Created November 4, 2012 14:24
Show Gist options
  • Save cgallagher/4012117 to your computer and use it in GitHub Desktop.
Save cgallagher/4012117 to your computer and use it in GitHub Desktop.
Bookmarklet for adding to fan page.
%20var%20template%20=%20'http://www.facebook.com/dialog/pagetab?app_id=%7Bid%7D&next=%7Bnext%7D',%20id%20=%20prompt('App%20ID'),next%20=%20prompt('App%20URL',%20'http://example.heroku.com');%20if(id%20&&%20next)%7B%20url%20=%20template.replace('%7Bid%7D',%20id).replace('%7Bnext%7D',%20next);window.location%20=%20url;%7D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment