sdk/src/com/socialize/facebook/Facebook.java
public void authorize(Activity activity, String[] permissions,
            int activityCode, final DialogListener listener) {

        boolean singleSignOnStarted = false;

        mAuthDialogListener = listener;

        // Prefer single sign-on, where available.
        if (activityCode >= 0) {
            singleSignOnStarted = startSingleSignOn(activity, mAppId,
                    permissions, activityCode);
        }
        // Otherwise fall back to traditional dialog.
        if (!singleSignOnStarted) {
            startDialogAuth(activity, permissions);
        }
    }
public void authorize(Activity activity, String[] permissions,
            int activityCode, final DialogListener listener) {

        boolean singleSignOnStarted = false;

        mAuthDialogListener = listener;

        // Prefer single sign-on, where available.
        if (activityCode >= 0) {
            singleSignOnStarted = startSingleSignOn(activity, mAppId,
                    permissions, activityCode);
        }
        // Otherwise fall back to traditional dialog.
        if (!singleSignOnStarted) {
            startDialogAuth(activity, permissions);
        }
    }
Full authorize method.

Starts either an Activity or a dialog which prompts the user to log in to
Facebook and grant the requested permissions to the given application.

This method will, when possible, use Facebook's single sign-on for
Android to obtain an access token. This involves proxying a call through
the Facebook for Android stand-alone application, which will handle the
authentication flow, and return an OAuth access token for making API
calls.

Because this process will not be available for all users, if single
sign-on is not possible, this method will automatically fall back to the
OAuth 2.0 User-Agent flow. In this flow, the user credentials are handled
by Facebook in an embedded WebView, not by the client application. As
such, the dialog makes a network request and renders HTML content rather
than a native UI. The access token is retrieved from a redirect to a
special URL that the WebView handles.

Note that User credentials could be handled natively using the OAuth 2.0
Username and Password Flow, but this is not supported by this SDK.

See http://developers.facebook.com/docs/authentication/ and
http://wiki.oauth.net/OAuth-2 for more details.

Note that this method is asynchronous and the callback will be invoked in
the original calling thread (not in a background thread).

Also note that requests may be made to the API without calling authorize
first, in which case only public information is returned.

IMPORTANT: Note that single sign-on authentication will not function
correctly if you do not include a call to the authorizeCallback() method
in your onActivityResult() function! Please see below for more
information. single sign-on may be disabled by passing FORCE_DIALOG_AUTH
as the activityCode parameter in your call to authorize().

@param activity
The Android activity in which we want to display the
authorization dialog.
@param applicationId
The Facebook application identifier e.g. "350685531728"
@param permissions
A list of permissions required for this application: e.g.
"read_stream", "publish_stream", "offline_access", etc. see
http://developers.facebook.com/docs/authentication/permissions
This parameter should not be null -- if you do not require any
permissions, then pass in an empty String array.
@param activityCode
Single sign-on requires an activity result to be called back
to the client application -- if you are waiting on other
activities to return data, pass a custom activity code here to
avoid collisions. If you would like to force the use of legacy
dialog-based authorization, pass FORCE_DIALOG_AUTH for this
parameter. Otherwise just omit this parameter and Facebook
will use a suitable default. See
http://developer.android.com/reference/android/
app/Activity.html for more information.
@param listener
Callback interface for notifying the calling application when
the authentication dialog has completed, failed, or been
canceled.