Skip to content

Instantly share code, notes, and snippets.

@joseadrian
Last active December 27, 2015 12:29
Show Gist options
  • Save joseadrian/7325588 to your computer and use it in GitHub Desktop.
Save joseadrian/7325588 to your computer and use it in GitHub Desktop.
Show link to install app from: - developers.facebook.com/apps/APP_ID - http://facebook.com/PAGE_USERNAME/app_APP_ID - http://facebook.com/pages/PAGE_NAME/PAGE_ID?v=app_APP_ID (v = sk)
var app_id = location.href.match(/(?:app(?:s\/|_))([0-9]+)/).pop();
var url = 'https://facebook.com/dialog/pagetab?app_id={app_id}&redirect_uri=http://facebook.com';
window.prompt("Copy URL [ctrl + c]", url.replace('{app_id}', app_id));
{
"name": "Facebook Install App",
"description": "Install facebook app if you are on fan or developers page of the app",
"icon": "http://www.caironet.net/images/social-networks-facebook.png",
"link": "http://joseadrian.com"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment