Skip to content

Instantly share code, notes, and snippets.

@lorn
Created April 25, 2012 18:48
Show Gist options
  • Save lorn/2492160 to your computer and use it in GitHub Desktop.
Save lorn/2492160 to your computer and use it in GitHub Desktop.
Facebook API access_token
export APP_SECRET="02dfd454ff2b2ddcc49ede93e9ee338b"
export APP_ID="159018987471635"
export REDIRECT_URI="https://apps.facebook.com/sandbox_lorn/fb/connect/"
export CODE="AQB0z1SNyYEaF_6FjFkLs-vNSzOS64EjVRilEQX_R6ubYYqUnT-iIh75Am8IdknC274oEn2Q0j4ZfgpyBvrI_zQR0rPA-cxmaXOwcj16HS9DaBphcCdGRhxqrQ_wKp4UZ4fOpDSre3mlFbRBZKyjw-FOA7QG-_IA8gx9IQiCLwdLLhAF2spW62-U0ug7B52FSkqfw6RDVOVD8165kBqMSP9a#_=_"
echo -e "https://graph.facebook.com/oauth/access_token?client_id=$APP_ID&redirect_uri=$REDIRECT_URI&client_secret=$APP_SECRET&code=$CODE"
curl "https://graph.facebook.com/oauth/access_token?client_id=$APP_ID&redirect_uri=$REDIRECT_URI&client_secret=$APP_SECRET&code=$CODE"
export APP_SECRET="02dfd454ff2b2ddcc49ede93e9ee338b"
export APP_ID="159018987471635"
export EXISTING_ACCESS_TOKEN="AAACQoH5CwxMBACLZBxMZBdHvgvbP8YMOn5e72QeuuTcpnv2vJudKIx1dnYUe0fK6I2fk2j53ZCJjesZAosEUoUKeadPX2PSsByeRsXiKdl4VDIdfmP7d"
export URI="https://apps.facebook.com/sandbox_lorn/fb/connect"
echo -e "url - https://graph.facebook.com/oauth/access_token?client_id=$APP_ID&client_secret=$APP_SECRET&grant_type=fb_exchange_token&fb_exchange_token=$EXISTING_ACCESS_TOKEN&redirect_uri=$URI"
curl "https://graph.facebook.com/oauth/access_token?client_id=$APP_ID&client_secret=$APP_SECRET&redirect_uri=$URI&grant_type=fb_exchange_token&fb_exchange_token=$EXISTING_ACCESS_TOKEN"
@sangminh
Copy link

Lon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment