简体   繁体   English

如何使用SSO在iOS中实现Fabcebook登录以显示对话框提示?

[英]How to implement Fabcebook Login in iOS with SSO for dialog prompt?

I want to implement Facebook login using dialog, not by automatic launching of the Facebook app or Safari. 我想使用对话框而不是通过自动启动Facebook应用程序或Safari来实现Facebook登录。

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. 我在项目中使用ARC,并编译了脚本文件( build_facebook_ios_sdk_static_lib.sh ),通过编译脚本文件,我在facebook-ios-sdk-master中找到了包含lib-> facebook-ios-sdk的文件夹,并在facebook内部-ios-sdk文件夹,我有一些.h文件,以及几个文件。 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. 问题是如何使用这些.h文件和几个文件来实现“登录”对话框。 and I don't want to login with launching Facebook native app or launching Safari in iOS. 而且我不想登录以启动Facebook本机应用程序或在iOS中启动Safari。 Please, is there any answer ? 拜托,有什么答案吗?

You need to do changes in facebook_ios_static lib before compilation. 编译之前,您需要在facebook_ios_static lib中进行更改。
open facebook.m file then go to the method 打开facebook.m文件,然后转到方法

[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. 因此,每次调用fb登录方法时,登录页面都会在对话框中提示,而不是在safari或facebook应用中。

I don't think it's possible. 我认为这是不可能的。 It's better to use the standard thing, since the users are already used to it. 最好使用标准的东西,因为用户已经习惯了它。

iOS6 should have already integrated with facebook, so no longer need to worry about this. iOS6应该已经与Facebook集成在一起,因此不再需要为此担心。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM