如何使用Facebook登录iOS应用程序 [英] How do I use Facebook Login via Facebook App for iOS

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

问题描述

我有一点问题。我正在Facebook的API上获取用户信息。我使用的代码在这里提供:



更新 Facebook SDK具有几种回退行为,可以在回到应用内视图之前尝试。您可以通过在代码中的相应位置设置断点来进行调试。从它的外观 https:// github.com/facebook/facebook-ios-sdk/blob/296771f5ed7674fcbed9c31cf39bf9c8e4706403/src/Login/FBSession.m#L1039 似乎是一个好的开始。



特别尝试调试 - [FBSessionAppSwitchingLoginStategy tryPerformAuthorizeWithParams:session:logger:


I have a little problem. I am sing Facebook's API to get users information. I am using the code that provide here: https://github.com/pedro1993/ios-howtos

In those examples, when somebody logs in with Facebook they are taken to the Facebook app, whereas when in my app, Facebook is opened in a UIWebView. How can I stop that from happening and use the Facebook app?

Here is an example:

Peter

解决方案

Follow this official tutorial instead https://developers.facebook.com/docs/facebook-login/ios/v2.0

Update Facebook SDK has several fallback behaviors to try before it falls back to in-app web view. You can debug it by setting breakpoints in corresponding places in code. From the look of it https://github.com/facebook/facebook-ios-sdk/blob/296771f5ed7674fcbed9c31cf39bf9c8e4706403/src/Login/FBSession.m#L1039 seems like a good place to start.

Especially try to debug -[FBSessionAppSwitchingLoginStategy tryPerformAuthorizeWithParams:session:logger:.

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

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