[英]How do I login with Facebook credentials on my iPhone application?
I have a web application that authenticates users against Facebook. 我有一个Web应用程序,可以根据Facebook对用户进行身份验证。 Once my site redirects them to login with Facebook, FB redirects them back to my site with a valid session cookie.
一旦我的网站将他们重定向到使用Facebook登录,FB就会使用有效的会话cookie将它们重定向回到我的网站。 This is a PHPCOOKIE I guess.
我猜这是一个PHPCOOKIE。
I would like to accomplish the same thing from my iPhone application. 我想通过我的iPhone应用程序完成同样的事情。 I have looked at the Facebook iPhone SDK, but that simply lets the iPhone application directly call the graph API.
我看过Facebook iPhone SDK,但这只是让iPhone应用程序直接调用图形API。
What I actually want to do is have my backend server call the graph API like it does with the browser. 我实际上想要做的是让后端服务器像在浏览器中一样调用图形API。
How do I get the iPhone SDK to pass the session cookie to all requests to my server, the same way the browser does? 如何获得iPhone SDK,以将会话cookie传递给对服务器的所有请求,就像浏览器一样?
This does actually occur- but you're on the iPhone, and the iPhone caches the "cookie" with auth info. 实际上确实会发生这种情况-但您在iPhone上,并且iPhone缓存带有身份验证信息的“ cookie”。 It's in NSDefaults.
在NSDefaults中。 It's also called single-sign-on or SSO.
也称为单点登录或SSO。 It detects Facebook login and authentication on the native app on the same device, and sets a local (iPhone app default) access token for further graph requests.
它在同一设备上的本机应用程序上检测Facebook登录和身份验证,并为其他图形请求设置本地(iPhone应用程序默认)访问令牌。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.