Add app to Facebook Tab bookmarklet


Since facebook updated their developer thingie, locating the "add app to page tab" was prettty har do find. Since you have to visit a "http://www.facebook.com/add.php?api_key=00some_api_id00&pages=1, seemed pretty cumbersome I decided to make a bookmarklet of it.

just add the code below in the location field of a new bookmark.

javascript:(function%20addApp(){var%20favorite%20=%20prompt("Enter%20api%20key:",%20"e.g.%20313674488717500");if%20(favorite){if(IsNumeric(favorite)){window.open("http://www.facebook.com/add.php?api_key="%20+%20favorite%20+%20"&pages=1").focus();}else{alert("Not%20a%20valid%20numeric%20value");}}else{}function%20IsNumeric(input){return%20(input%20-%200)%20==%20input%20&&%20input.length%20>%200;}})();