1) create a facebook application, if you don't already have one usable for this project
2) load in your browser, already logged in to fb as the account you want your server side app to connect as, and click "allow" for the requested permissions:
3) copy the "code" parameter from the resulting url's query string, use that in:
http://www.facebook.com/developers/apps.php#!/developers/createapp.php -- and set sandbox/developer mode on! @ Advanced Settings > Sandbox Mode > Enable (Lets only the developers of your application see it.) You'll need the Application ID (APP_ID) and Secret Key (SECRET_KEY) that are listed on your developer account summary of that application but not the old API Key.2) load in your browser, already logged in to fb as the account you want your server side app to connect as, and click "allow" for the requested permissions:
https://graph.facebook.com/oauth/authorize?client_id=APP_ID&scope=offline_access,read_stream&redirect_uri=http://www.facebook.com/connect/login_success.html3) copy the "code" parameter from the resulting url's query string, use that in:
https://graph.facebook.com/oauth/access_token?client_id=APP_ID&redirect_uri=http://www.facebook.com/connect/login_success.html&client_secret=APP_SECRET&code=CODE_FROM_2 And copy the right hand side of access_token= in the resulting page's text, which will be in the structure of: APP_ID|HEXNUM-USER_ID|WEIRD_KEY
Комментариев нет:
Отправить комментарий