Skip to content

Instantly share code, notes, and snippets.

@bzhr
Forked from kesor/facebook_test_user.sh
Created August 30, 2017 13:27
Show Gist options
  • Save bzhr/f2202ba07d34cdf763c6ccc82db7bacf to your computer and use it in GitHub Desktop.
Save bzhr/f2202ba07d34cdf763c6ccc82db7bacf to your computer and use it in GitHub Desktop.
Login URL for Facebook test user
#!/bin/sh
set -e
#
# create a test user at developer.facebook.com and set these
#
FULL_NAME="Bob+Amchicieafci+Martinazziman"
APP_ID="123456123456123"
APP_SECRET="123abc123abc123abc123abc123abc12"
APP_ACCESS_TOKEN=$( curl -s "https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&client_id=${APP_ID}&client_secret=${APP_SECRET}" )
curl -s "https://graph.facebook.com/${APP_ID}/accounts/test-users?installed=true&name=${FULL_NAME}&locale=en_US&permissions=read_stream&method=post&${APP_ACCESS_TOKEN}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment