Reputation: 1167
I am building a tool that allow my organisation to add a premade tab on a Facebook page, but user have to use it's own Facebook App and set my URLs in config.
I have seen this post about validating an app with it's ID. But I want to be able to validate that both the App ID and App Secret are good before saving them (crypted) to database so the user can add the Page Tab and I can access the signed_request
after.
How can I validate the App ID the user provides is valid too? And is related to the ID he also provided?
Thank a lot!
Upvotes: 2
Views: 2655
Reputation: 11852
You can get all this by making a GET request to:
https://graph.facebook.com/_APP_ID_?fields=roles&access_token=_APP_ID_|_APP_SECRET_
If the _APP_ID_
and _APP_SECRET_
provided are not valid, this will not return any data. If these are valid, then the user
ID should be returned in the json object you get back.
Upvotes: 5