简体   繁体   English

ios如何使用带有sso的ShareKit2.0仅登录Facebook?

[英]ios How to just login to facebook using ShareKit2.0 with sso?

What is the best practice to JUST login to facebook, using ShareKit 2.0? 使用ShareKit 2.0仅登录Facebook的最佳实践是什么?

Now I'm using: 现在我正在使用:

service = [[SHKFacebook alloc] init]; 服务= [[SHKFacebook alloc] init]; [service authorize]; [服务授权];

With : 与:

- (void)authorize:(NSArray *)permissions {
self.permissions = permissions;

[self authorizeWithFBAppAuth:YES safariAuth:NO];}

Using this configurations, if fb app is installed, when pressing login it goes to fb app and it is saying that "You have already authorized this app...." Pressing ok returns to my app and logins in without entering credetinals. 使用此配置,如果安装了fb应用程序,则在按登录时会转到fb应用程序,并说“您已经授权了此应用程序...。”按ok将返回我的应用程序,并且无需输入证书即可登录。

Using [self authorizeWithFBAppAuth:NO safariAuth:NO]; 使用[self authorizeWithFBAppAuth:NO safariAuth:NO]; prompts the credetianls login dialog. 提示credetianls登录对话框。

PS I've followed all the steps in Sharekit 2.0 wiki page. PS我已经按照Sharekit 2.0 Wiki页面中的所有步骤进行操作。

Any idea how to make the app login automatically without going to fb app to press the "Okay" button? 任何想法如何使应用程序自动登录,而无需转到fb应用程序按“确定”按钮?

Thanks 谢谢

In facebook.m 在facebook.m中

[self authorizeWithFBAppAuth:NO safariAuth:NO]; [self authorizeWithFBAppAuth:NO safariAuth:NO];

and once logged in you can do the stuff in - (void)fbDidLogin in shkfacebook.m 并且一旦登录,您就可以在shkfacebook.m中的-(void)fbDidLogin中进行操作

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

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