loginWithFacebook() with stayLoggedIn.

Hi,
trying to do loginWithFacebook() with the stayLoggedIn parameter.
can’t find or compile any variation that I’ve tried.
please help with the proper syntax for the stayLoggedIn parameter.
thanks,
Gil.

Hi, Gil.
Did you try these methods?

    loginWithFacebook(Activity context, WebView webView, AsyncCallback<BackendlessUser> responder, boolean stayLoggedIn) loginWithFacebook(Activity context, WebView webView, Map<String, String> facebookFieldsMappings, List<String> permissions, AsyncCallback<BackendlessUser> responder, boolean stayLoggedIn)

In case you get other syntax questions you can look into Backendless Android SDK sources here

Dear Anatolii,

My code is :
Backendless.UserService.loginWithFacebook(MainActivity.this, null, facebookFieldMappings,
permissions, new AsyncCallback<BackendlessUser>() {

I can’t add the stayLoggedIn at the end becuase Android Studio doesn’t aceept it. it’s an error.
Can you show me the currect syntax ?
Thanks!

Here’s the example. If you still get compilation error try to download the latest Android SDK (backendless.jar)

    Backendless.UserService.loginWithFacebook( MainActivity.this, null, facebookFieldMappings, permissions, new AsyncCallback&lt;BackendlessUser&gt;()
{
  @Override
  public void handleResponse( BackendlessUser backendlessUser )
  {
    startActivity( new Intent( getBaseContext(), LoginSuccessActivity.class ) );
    finish();
  }


  @Override
  public void handleFault(BackendlessFault backendlessFault) {
    
  }
}, true );

}

Dear Anatolii, I think it worked!

Android Studio doesn’t show an error, I will build an APK and see if it worked.