Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Something like this</p> <pre><code>private void performFacebookLogin() { Log.d("FACEBOOK", "performFacebookLogin"); final Session.NewPermissionsRequest newPermissionsRequest = new Session.NewPermissionsRequest(this, Arrays.asList("email")); Session openActiveSession = Session.openActiveSession(this, true, new Session.StatusCallback() { @Override public void call(Session session, SessionState state, Exception exception) { Log.d("FACEBOOK", "call"); if (session.isOpened() &amp;&amp; !isFetching) { Log.d("FACEBOOK", "if (session.isOpened() &amp;&amp; !isFetching)"); isFetching = true; session.requestNewReadPermissions(newPermissionsRequest); Request getMe = Request.newMeRequest(session, new GraphUserCallback() { @Override public void onCompleted(GraphUser user, Response response) { Log.d("FACEBOOK", "onCompleted"); if (user != null) { Log.d("FACEBOOK", "user != null"); org.json.JSONObject graphResponse = response.getGraphObject().getInnerJSONObject(); String email = graphResponse.optString("email"); String id = graphResponse.optString("id"); String facebookName = user.getUsername(); if (email == null || email.length() &lt; 0) { Logic.showAlert( ActivityLogin.this, "Facebook Login", "An email address is required for your account, we could not find an email associated with this Facebook account. Please associate a email with this account or login the oldskool way."); return; } } } }); getMe.executeAsync(); } else { if (!session.isOpened()) Log.d("FACEBOOK", "!session.isOpened()"); else Log.d("FACEBOOK", "isFetching"); } } }); </code></pre> <p>Actually exactly like that. It works perfectly fine for me.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload