Skip to content

Instantly share code, notes, and snippets.

@keith9820
Created October 1, 2013 20:55
Show Gist options
  • Save keith9820/6784976 to your computer and use it in GitHub Desktop.
Save keith9820/6784976 to your computer and use it in GitHub Desktop.
This bookmarklet code adds a Facebook app to a page.
javascript:function p(d){return d.selection?d.selection.createRange().text:d.getSelection();} s=p(document); for(i=0;i<frames.length&&!s;i++)s=p(frames[i].document);if(!s||s=='')s=prompt('Enter Facebook AppId:','');if(s){open('https://www.facebook.com/dialog/pagetab?display=popup&next=http://www.facebook.com&app_id='+encodeURIComponent(s));}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment