SDKBOX Facebook IOS caught in a loop

Hi I’m having a problem using the latest sdkbox facebook with ios looked all over the forum for a solution but found nothing.
When I 'm logged in with the facebook app and try to login into my app using facebook I get caught in a loop: (1) I get a pop up saying " Open this in “facebook”" (2)the FB app open and ask me if I want to continue (3)tap ok (4)go back to my app briefly and then I get facebook.com on safari asking to login with fab app I tap it keep asking me do I want to login using facebook --> back to (1)
But if I’m logged in through safari it works flawlessly.
Android work perfectly.

We can ask @yinjimmy to help.

is your facebook app works ?

can fetch/post message.

I can not access facebook app, but I can login facebook.com.

The facebook app can not access network.

Yes the facebook app work ( post/share…). ( I’m not sure I understand your question )
I solved the issue just by using the facebook sample project, I’m not sure if this is just a work around or what I should’ve done from the beginning.
also It seems that the sample project uses an old cocos file structure.

http://docs.sdkbox.com/en/plugins/facebook/v3-cpp/#setup-ios

plz make make you have bellow code in AppController.mm file.

#import <FBSDKCoreKit/FBSDKCoreKit.h>

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

  //
  // **************************
  // !! IMPORTANT !!
  // **************************
  //
  // call [[FBSDKApplicationDelegate sharedInstance] application:didFinishLaunchingWithOptions
  // before app->run()

  [[FBSDKApplicationDelegate sharedInstance] application:application
    didFinishLaunchingWithOptions:launchOptions];

  app->run();

  return YES;
}

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
            options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {

  BOOL handled = [[FBSDKApplicationDelegate sharedInstance] application:application
    openURL:url
    sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
    annotation:options[UIApplicationOpenURLOptionsAnnotationKey]
  ];
  // Add any custom logic here.
  return handled;
}

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation {

  BOOL handled = [[FBSDKApplicationDelegate sharedInstance] application:application
    openURL:url
    sourceApplication:sourceApplication
    annotation:annotation
  ];
  // Add any custom logic here.
  return handled;
}

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.