Everything About APIs
Solutions and tricks for all types of APIs including Facebook and Google
Facebook APIs
Generating Graph Access Token that Never Expire
- Make sure you are the admin of the FB page you wish to pull info from
- Create a FB App using the Page admin's account
- Head over to the Facebook Graph API Explorer
- Select the FB App you created from the "Application" drop down list
- Click "Get User Access Token"
- Make sure that "manage_pages" permission is checked
- Make a GET request to: https://graph.facebook.com/oauth/access_token?client_id=<App ID>&client_secret=<App secret>&grant_type=fb_exchange_token&fb_exchange_token=<short-lived access token>
- Copy the new long-lived token from the response
- Make another get request to: https://graph.facebook.com/me/accounts?access_token=<your long-lived access token>
- Copy the new token and paste it to Access Token Debug Tool, make sure that it never expires
References
- This stackoverflow post
Common Parse API Operations
Get schema
curl -X GET \
-H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
https://wiki.twcloud.tech:1337/parse/schemas
Drop schema
curl -X DELETE\
-H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
https://api.parse.com/1/schemas/${SCHEMA}