是否可以做Server-& gt; Facebook身份验证? [英] Is it possible to do Server -> Facebook authentication?
问题描述
我的快速调查似乎表明FB已经弃用了所有身份验证机制,同时保留了自定义的oauth实现.
My quick investigations appear to suggest that FB has deprecated all auth mechanisms while leaving their custom oauth implementation.
有人可以评论或澄清此声明吗?
Can someone comment or clarify this statement ?
为什么?
- 我希望用户针对我的应用而非FB进行身份验证
- 稍后,我希望从FB处获取一些资产,例如当前用户的照片等.
推荐答案
您将至少需要让他们使用Facebook ID进行身份验证并授权您的应用.从那时起,您将在JSON响应中收到一个access_token
,您可以使用它为用户执行操作.
You will need at least once to let them authenticate with the facebook ID and authorize your app. From that moment, you will receive an access_token
in the JSON response that will allow you to perform operations for your user.
访问令牌有两种类型:
- 基于会话的:短期到期,在每次需要执行操作的用户登录到FB时使用.
- 离线访问:不会过期,并允许该应用随时为用户执行操作.授权该应用程序后,需要
offline_access
权限.
- Session based: expires in a short term, are used when the user will be logged to FB every time you need to perform an operation.
- Offline access: do not expire and allow the app to perform operations for the user in any moment. This requires the
offline_access
permission when the app is authorized.
在此处检查: http://developers.facebook.com/docs/authentication/有关oauth机制的信息,请参见: http://developers.facebook.com/docs/authentication/permissions /查看权限列表.
Check here: http://developers.facebook.com/docs/authentication/ for the oauth mechanism and here: http://developers.facebook.com/docs/authentication/permissions/ for the permissions list.
这篇关于是否可以做Server-& gt; Facebook身份验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!