如何在iOS中使用SSO实现Fabcebook登录以进行对话提示? [英] How to implement Fabcebook Login in iOS with SSO for dialog prompt?

查看:256
本文介绍了如何在iOS中使用SSO实现Fabcebook登录以进行对话提示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用对话框实现Facebook登录,而不是通过自动启动Facebook应用程序或Safari。


我在我的项目中使用ARC,并且我编译了脚本文件( build_facebook_ios_sdk_static_lib.sh ),通过编译脚本文件,我在包含 lib-> facebook-ios-sdk 的我的facebook-ios-sdk-master文件夹中,在facebook-ios- sdk文件夹,我有一些 .h 文件和几个文件。所有文件都被拖放到项目中。

问题是如何使用这些 .h 文件和几个文件来实现Login对话框。我不想通过启动Facebook本机应用程序登录,或者在iOS中启动Safari。请问有没有答案?

解决方案

在编译之前,您需要在facebook_ios_static lib中进行更改。

打开 facebook.m 文件,然后转到方法

  [facebook authorize:nil];  / pre>并设置

  [self authorizeWithFBAppAuth:NO safariAuth:NO];  

然后编译它。 br>
所以每当你调用fb登录方法时,登录页面将提示对话框不在safari或者Facebook应用程序。


I want to implement Facebook login using dialog, not by automatic launching of the Facebook app or Safari.

Im using ARC in my project and I've compiled the script file (build_facebook_ios_sdk_static_lib.sh), by compiling the script file, I got folders in my facebook-ios-sdk-master containing lib->facebook-ios-sdk and inside facebook-ios-sdk folder, I have some .h files, and couple of files. all that files have been dragged and dropped to the project.
Problem is how to implement Login dialog with those .h files and couple of files. and I don't want to login with launching Facebook native app or launching Safari in iOS. Please, is there any answer ?

解决方案

You need to do changes in facebook_ios_static lib before compilation.
open facebook.m file then go to the method

[facebook authorize:nil];

and set

[self authorizeWithFBAppAuth:NO safariAuth:NO];

and then compile it.
So everytime, when you'll call fb login method, login page will prompt in dialog box not in safari or facebook app.

这篇关于如何在iOS中使用SSO实现Fabcebook登录以进行对话提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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