验证Facebook应用程序ID和应用程序秘密 [英] Validate a Facebook App ID and App Secret
问题描述
我正在建立一个工具,允许我的组织在Facebook页面上添加一个预制选项卡,但用户必须使用自己的Facebook应用程序,并将配置文件设置为我的URL。
我已经看到这篇文章关于使用其ID验证应用程序。但是,我希望能够验证应用程序ID和应用程序秘密是否良好,然后保存(加密)到数据库,以便用户可以添加页面选项卡,我可以访问 signed_request
after。
如何验证用户提供的应用程序ID是否有效?而且与他还提供的ID有关?
非常感谢!
您可以通过GET请求获取所有这些:
https://graph.facebook.com/ _APP_ID_?fields = roles& access_token = _APP_ID_ | _APP_SECRET_
如果 _APP_ID_
和 _APP_SECRET _
提供无效,不会返回任何数据。如果这些是有效的,那么 c $ c>用户 ID应该返回给你回来的json对象。
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!
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.
这篇关于验证Facebook应用程序ID和应用程序秘密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!