Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
429 views
in Technique[技术] by (71.8m points)

ios - Apple rejected app 10.6 because Facebook opens Safari to login

I sent another version of my app, that allow users to login via Facebook. Of course, I use official Facebook iOS SDK.

But Apple twice rejected my app with following reason:

The app opens a web page in mobile Safari for logging in, then returns the user to the app. The user should be able log in without opening Safari first.

I tried to get more info, and reviewer's answer was:

Thank you for your response. We reviewed your app version 3.2.1 and when the user taps Facebook to login, the user is taken to mobile Safari and then back to the app.

It provides poor user's experience and not in compliance with the Guidelines.

and

Thank you for your response. It would be appropriate to allow the users to login inside the app without redirecting to mobile Safari.

Why only my app got this error, when dozens of apps using Facebook iOS SDK this way and don't get rejects?

Is there way in Facebook iOS SDK to open login page inside app?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Facebook SDK 4.0+

FBSDKLoginManager *login = [FBSDKLoginManager new];
if (![UIApplication.sharedApplication canOpenURL:[NSURL URLWithString:@"fb://"]])
{
  login.loginBehavior = FBSDKLoginBehaviorWeb;
}

It will prevent to open through Safari.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...