Facebook SDK登录Iphone应用程序 [英] Facebook SDK Login in Iphone Application

查看:129
本文介绍了Facebook SDK登录Iphone应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用FaceBook SDK for iOS。

I am using FaceBook SDK for iOS.

登入UIWebView,我们必须新增使用者名称和密码。

For login a UIWebView comes and we have to add username and password. I don't want to login like this.

如果用户从iOS应用程序提供用户名和密码,可以在后台进行登录或不打开UIWebView?

Can the login be done in the background or without opening the UIWebView if user provide the username and password from iOS Application?

推荐答案

FaceBook的SDK不允许。他们已经实现了oauth登录方法,以便用户不需要为应用程序提供用户名和密码,用户直接在Web视图中输入凭据,并通过fb服务器进行身份验证。但作为响应,应用程序接收到一个访问令牌,它可以保存并用于将来的事务,用户不需要再次输入他的用户名或密码。本教程在这方面可能会有所帮助:

FaceBook's SDK doesn't allow that.. they've implemented the oauth login method so that the user don't need to give username and password to the application, user directly input the credentials in the web view and get authenticated via the fb servers. But in response app receives an access token which it can save and and use for future transactions and user don't need to enter his username or password again. This tutorial might be helpful in this regard:

http://www.raywenderlich.com/1488/how-to-use-facebooks-new-graph-api-from-your-iphone -app

SDK中提供了委派方法,您可以在其中保存访问令牌。

Delegate methods are available in the SDK in which you can save the access token.

这篇关于Facebook SDK登录Iphone应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆