Java Code Examples for com.facebook.internal.NativeProtocol#createLoginDialog20121101Intent()

The following examples show how to use com.facebook.internal.NativeProtocol#createLoginDialog20121101Intent() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AuthorizationClient.java    From platform-friends-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
@Override
boolean tryAuthorize(AuthorizationRequest request) {
    applicationId = request.getApplicationId();

    Intent intent = NativeProtocol.createLoginDialog20121101Intent(context, request.getApplicationId(),
            new ArrayList<String>(request.getPermissions()),
            request.getDefaultAudience().getNativeProtocolAudience());
    if (intent == null) {
        return false;
    }

    callId = intent.getStringExtra(NativeProtocol.EXTRA_PROTOCOL_CALL_ID);

    addLoggingExtra(EVENT_EXTRAS_APP_CALL_ID, callId);
    addLoggingExtra(EVENT_EXTRAS_PROTOCOL_VERSION,
            intent.getIntExtra(NativeProtocol.EXTRA_PROTOCOL_VERSION, 0));
    addLoggingExtra(EVENT_EXTRAS_PERMISSIONS,
            TextUtils.join(",", intent.getStringArrayListExtra(NativeProtocol.EXTRA_PERMISSIONS)));
    addLoggingExtra(EVENT_EXTRAS_WRITE_PRIVACY, intent.getStringExtra(NativeProtocol.EXTRA_WRITE_PRIVACY));
    logEvent(AnalyticsEvents.EVENT_NATIVE_LOGIN_DIALOG_START,
            AnalyticsEvents.PARAMETER_NATIVE_LOGIN_DIALOG_START_TIME, callId);

    return tryIntent(intent, request.getRequestCode());
}
 
Example 2
Source File: AuthorizationClient.java    From Klyph with MIT License 6 votes vote down vote up
@Override
boolean tryAuthorize(AuthorizationRequest request) {
    applicationId = request.getApplicationId();

    Intent intent = NativeProtocol.createLoginDialog20121101Intent(context, request.getApplicationId(),
            new ArrayList<String>(request.getPermissions()),
            request.getDefaultAudience().getNativeProtocolAudience());
    if (intent == null) {
        return false;
    }

    callId = intent.getStringExtra(NativeProtocol.EXTRA_PROTOCOL_CALL_ID);

    addLoggingExtra(EVENT_EXTRAS_APP_CALL_ID, callId);
    addLoggingExtra(EVENT_EXTRAS_PROTOCOL_VERSION,
            intent.getIntExtra(NativeProtocol.EXTRA_PROTOCOL_VERSION, 0));
    addLoggingExtra(EVENT_EXTRAS_PERMISSIONS,
            TextUtils.join(",", intent.getStringArrayListExtra(NativeProtocol.EXTRA_PERMISSIONS)));
    addLoggingExtra(EVENT_EXTRAS_WRITE_PRIVACY, intent.getStringExtra(NativeProtocol.EXTRA_WRITE_PRIVACY));
    logEvent(AnalyticsEvents.EVENT_NATIVE_LOGIN_DIALOG_START,
            AnalyticsEvents.PARAMETER_NATIVE_LOGIN_DIALOG_START_TIME, callId);

    return tryIntent(intent, request.getRequestCode());
}
 
Example 3
Source File: AuthorizationClient.java    From barterli_android with Apache License 2.0 6 votes vote down vote up
@Override
boolean tryAuthorize(AuthorizationRequest request) {
    applicationId = request.getApplicationId();

    Intent intent = NativeProtocol.createLoginDialog20121101Intent(context, request.getApplicationId(),
            new ArrayList<String>(request.getPermissions()),
            request.getDefaultAudience().getNativeProtocolAudience());
    if (intent == null) {
        return false;
    }

    callId = intent.getStringExtra(NativeProtocol.EXTRA_PROTOCOL_CALL_ID);

    addLoggingExtra(EVENT_EXTRAS_APP_CALL_ID, callId);
    addLoggingExtra(EVENT_EXTRAS_PROTOCOL_VERSION,
            intent.getIntExtra(NativeProtocol.EXTRA_PROTOCOL_VERSION, 0));
    addLoggingExtra(EVENT_EXTRAS_PERMISSIONS,
            TextUtils.join(",", intent.getStringArrayListExtra(NativeProtocol.EXTRA_PERMISSIONS)));
    addLoggingExtra(EVENT_EXTRAS_WRITE_PRIVACY, intent.getStringExtra(NativeProtocol.EXTRA_WRITE_PRIVACY));
    logEvent(AnalyticsEvents.EVENT_NATIVE_LOGIN_DIALOG_START,
            AnalyticsEvents.PARAMETER_NATIVE_LOGIN_DIALOG_START_TIME, callId);

    return tryIntent(intent, request.getRequestCode());
}
 
Example 4
Source File: AuthorizationClient.java    From KlyphMessenger with MIT License 6 votes vote down vote up
@Override
boolean tryAuthorize(AuthorizationRequest request) {
    applicationId = request.getApplicationId();

    Intent intent = NativeProtocol.createLoginDialog20121101Intent(context, request.getApplicationId(),
            new ArrayList<String>(request.getPermissions()),
            request.getDefaultAudience().getNativeProtocolAudience());
    if (intent == null) {
        return false;
    }

    callId = intent.getStringExtra(NativeProtocol.EXTRA_PROTOCOL_CALL_ID);

    addLoggingExtra(EVENT_EXTRAS_APP_CALL_ID, callId);
    addLoggingExtra(EVENT_EXTRAS_PROTOCOL_VERSION,
            intent.getIntExtra(NativeProtocol.EXTRA_PROTOCOL_VERSION, 0));
    addLoggingExtra(EVENT_EXTRAS_PERMISSIONS,
            TextUtils.join(",", intent.getStringArrayListExtra(NativeProtocol.EXTRA_PERMISSIONS)));
    addLoggingExtra(EVENT_EXTRAS_WRITE_PRIVACY, intent.getStringExtra(NativeProtocol.EXTRA_WRITE_PRIVACY));
    logEvent(AnalyticsEvents.EVENT_NATIVE_LOGIN_DIALOG_START,
            AnalyticsEvents.PARAMETER_NATIVE_LOGIN_DIALOG_START_TIME, callId);

    return tryIntent(intent, request.getRequestCode());
}