SDKBOX Facebook call login automatically

Thanks for the example. We compared our code with yours and foudn the issue. We had a problem here

bool ret= [[FBSDKApplicationDelegate sharedInstance] application:application
didFinishLaunchingWithOptions:launchOptions];

app->run();

return ret;

Instead of returning ret we returned true. Thank you very much for the help :slight_smile:

i also faced same problem .for the first time onLogin(bool isLogin, const std::string& error) it is fine i have logged in but when i come to next time its automatically called even i have not called sdkbox::PluginFacebook::login(); from anywhere.

So you don’t want user to login to facebook automatically? You can call logout when your app exits, that would make sure facebook auto login won’t happen.

thanks i will do this.

Are you sure that it is what you need? :smile:
I think there is sometimes issue that when you already logged in to Facebook and automatically login in with each application launch, sometimes application throwing Facebook default login dialog instead of logging silently - so this is main issue. That this dialog appear from nowhere and user get confused.

I have manged my code with useddefault .it will be better if onlogin() is called when user login manually.

@yinjimmy Hi sir, I have a problem in facebook login with SDK box, my problem is if I log out and again click on facebook login button it is not asking for authentication and directly log in now if I want to login with a different account how can we this is my problem

yes I have the native Facebook app installed on my phone

you can try:

  1. logout from Game
  2. logout from Facebook Native app
  3. game login

Thanks

thanks for reply, okay and any other work around so we don’t need to go to native app and logout, like IOS?