Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are two independent things going on here:<br> 1) whether your user has authenticated your app (with permissions) to Facebook and<br> 2) whether your user is logged in to Facebook. </p> <p>Authentication is required the first time your user uses your app and lasts until the user explicitly de-authenticates (e.g. through the Facebook web Account Settings -> Apps -> App Settings).</p> <p>Log in may be required each time your user starts your app. But if you use the default SDK authorize(), that tries to do a Single Sign On (SSO), where if the Facebook app is logged in, your app is automatically logged in and uses the existing access token.</p> <p>If you are using SSO, when you do a logout, that has no effect, as a real logout would have to log out the Facebook app - which the user might not like!</p> <p>You can get around this behavior by doing an authorize of the form</p> <pre><code>authorize(this, PERMISSIONS, FORCE_DIALOG_AUTH, new LoginDialogListener()); </code></pre> <p>which avoids SSO and forces a dialog login. Of course, that then forces your user to login each time you start your app - unless you save the login details / access token under the covers (which is what the SDK does - check the source).</p> <p><strong>EDITED:</strong></p> <blockquote> <pre><code> m_facebook.authorize(FacebookActivity.this, PERMISSIONS, Facebook.FORCE_DIALOG_AUTH, new LoginDialogListener()); class LoginDialogListener implements DialogListener { public void onComplete(Bundle p_values) { saveCredentials(m_facebook); if (m_messageToPost != null) { postToWall(m_messageToPost); } } public void onFacebookError(FacebookError p_error) { finish(); } public void onError(DialogError p_error) { finish(); } public void onCancel() { finish(); } } </code></pre> </blockquote>
    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