質問

I'm struggling to submit an Android/iOS application to App Center, however I'm getting constantly rejected with the following reason:

General Feedback:

  • Your Android app does not appear to have Facebook Login integration. Please either implement Facebook Login or remove this integration as a listed platform in the developer app. See more details here
  • Your iOS app does not appear to have Facebook Login integration. Please either implement Facebook Login or remove this integration as a listed platform in the developer app. See more details here

Facebook login button is placed in Settings dialog, where a normal email/password login is located as well.

Unfortunately the review team doesn't specify why exactly it appears to them that Facebook Login integration is missing.

So, are there any specific requirements on Login implementation which I may be missing?

役に立ちましたか?

解決 3

Okay, the one thing that helped passing review was adding Facebook logo on the login button in the Settings screen.

他のヒント

Review the Facebook developers page - They outline instructions on how to get started with Facebook integration into an Android app here, talk about Facebook authentication here, and have a tutorial for a Facebook login here. Perhaps your issue is not following the outlined requirements, so you have a login, but not in the proper format.

I don't use the Login Button. Instead, have a made function in appdelegate to get the FBSession.

- (BOOL)openSessionWithAllowLoginUI:(BOOL)allowLoginUI andCompletionBlock:(void (^)(void)) action{
BOOL theResult = [FBSession openActiveSessionWithPublishPermissions:[NSArray arrayWithObject:@"publish_actions"] defaultAudience:FBSessionDefaultAudienceFriends allowLoginUI:allowLoginUI
                                               completionHandler:^(FBSession *session,
                                                                   FBSessionState state,
                                                                   NSError *error) {
                                                   if (state == FBSessionStateOpen) {
                                                       action();
                                                   }
                                                   //action();
                                                   [self sessionStateChanged:session
                                                                       state:state
                                                                       error:error];
                                               }];
return theResult;
}

Then When I want to post, I do this:

    if (!FBSession.activeSession.isOpen) {
    [theAppDelegate openSessionWithAllowLoginUI:YES andCompletionBlock:^{
    //Your Code            
        [self postToWall];

    }];
}
else {
        [self postToWall];
 }

- (void) performPublishAction:(void (^)(void)) action {
// we defer request for permission to post to the moment of post, then we check for the permission
if ([FBSession.activeSession.permissions indexOfObject:@"publish_actions"] == NSNotFound) {
    [FBSession.activeSession requestNewPublishPermissions:[NSArray arrayWithObject:@"publish_actions"]
                                               defaultAudience:FBSessionDefaultAudienceFriends
                                             completionHandler:^(FBSession *session, NSError *error) {
                                                 if (!error) {
                                                     action();
                                                 }
                                             }];
      } else {
          action();
     }
}

   -(void)postToWall {
[self performPublishAction:^{
    NSMutableDictionary* params1 = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                    kFacebookAppID, @"api_key",
                                    kLink,          @"link",
                                    photo,          @"picture",
                                    kAppName,       @"name",
                                    kDescription,   @"description",
                                    nil];

    FBRequestConnection *connection = [[FBRequestConnection alloc] init];
    FBRequest *theRequest = [[FBRequest alloc] initWithSession:[FBSession activeSession] graphPath:@"me/photos" parameters:params1 HTTPMethod:@"POST"];
    [connection addRequest:theRequest completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
        NSLog(@"Result from Facebook request: %@",result);
        if (!error) {
            [[NSNotificationCenter defaultCenter] postNotificationName:@"UploadComplete" object:nil];
        }
        else
        {

        }
    }];
    [connection start];

}]; 
}

Add these functions as well.

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
// attempt to extract a token from the url
return [FBSession.activeSession handleOpenURL:url];
}

/*
 * Callback for session changes.
 */
- (void)sessionStateChanged:(FBSession *)session state:(FBSessionState) state error:(NSError *)error
{
switch (state) {
    case FBSessionStateOpen:
        if (!error) {
            // We have a valid session
            NSLog(@"User session found");
        }
        break;
    case FBSessionStateClosed:
    case FBSessionStateClosedLoginFailed:
        [FBSession.activeSession closeAndClearTokenInformation];
        break;
    default:
        break;
}

[[NSNotificationCenter defaultCenter]
 postNotificationName:FBSessionStateChangedNotification
 object:session];

if (error) {
    UIAlertView *alertView = [[UIAlertView alloc]
                              initWithTitle:@"Error"
                              message:error.localizedDescription
                              delegate:nil
                              cancelButtonTitle:@"OK"
                              otherButtonTitles:nil];
    [alertView show];
}
}

Hope this helps!

Facebook has its own developer guidelines that you can find here: https://developers.facebook.com/docs/appcenter/guidelines/ . Almost at the end of the document you have a section calle "Common submission mistakes". Check it, follow the links and perhaps there you can find where your problem is.

Hope this helps!

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top