• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java DefaultAudience类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中com.facebook.login.DefaultAudience的典型用法代码示例。如果您正苦于以下问题:Java DefaultAudience类的具体用法?Java DefaultAudience怎么用?Java DefaultAudience使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

DefaultAudience类属于com.facebook.login包,在下文中一共展示了DefaultAudience类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createProxyAuthIntent

点赞 3

import com.facebook.login.DefaultAudience; //导入依赖的package包/类
public static Intent createProxyAuthIntent(Context context, String applicationId, Collection<String> permissions, String e2e, boolean isRerequest, boolean isForPublish, DefaultAudience defaultAudience) {
    for (NativeAppInfo appInfo : facebookAppInfoList) {
        Intent intent = new Intent().setClassName(appInfo.getPackage(), FACEBOOK_PROXY_AUTH_ACTIVITY).putExtra("client_id", applicationId);
        if (!Utility.isNullOrEmpty(permissions)) {
            intent.putExtra("scope", TextUtils.join(",", permissions));
        }
        if (!Utility.isNullOrEmpty(e2e)) {
            intent.putExtra(FACEBOOK_PROXY_AUTH_E2E_KEY, e2e);
        }
        intent.putExtra("response_type", "token,signed_request");
        intent.putExtra("return_scopes", "true");
        if (isForPublish) {
            intent.putExtra("default_audience", defaultAudience.getNativeProtocolAudience());
        }
        intent.putExtra("legacy_override", "v2.5");
        if (isRerequest) {
            intent.putExtra("auth_type", "rerequest");
        }
        intent = validateActivityIntent(context, intent, appInfo);
        if (intent != null) {
            return intent;
        }
    }
    return null;
}
 

开发者ID:JackChan1999,
项目名称:letv,
代码行数:26,
代码来源:NativeProtocol.java

示例2: onCreate

点赞 2

import com.facebook.login.DefaultAudience; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    // initialize facebook configuration
    PermissionHelper[] permissions = new PermissionHelper[]{
            PermissionHelper.USER_ABOUT_ME,
            PermissionHelper.EMAIL,
            PermissionHelper.USER_PHOTOS,
            PermissionHelper.USER_EVENTS,
            PermissionHelper.USER_ACTIONS_MUSIC,
            PermissionHelper.USER_FRIENDS,
            PermissionHelper.USER_GAMES_ACTIVITY,
            PermissionHelper.USER_BIRTHDAY,
            PermissionHelper.USER_TAGGED_PLACES,
            PermissionHelper.USER_MANAGED_GROUPS,
            PermissionHelper.PUBLISH_ACTION};

    SimpleFacebookConfiguration configuration = new SimpleFacebookConfiguration.Builder()
            .setAppId(String.valueOf(R.string.facebook_app_id))
            .setPermissions(permissions)
            .setDefaultAudience(DefaultAudience.FRIENDS)
            .setAskForAllPermissionsAtOnce(false)
            .build();

    // init lib
    ReactiveFB.sdkInitialize(this);
    ReactiveFB.setConfiguration(configuration);
}
 

开发者ID:WassimBenltaief,
项目名称:ReactiveFB,
代码行数:30,
代码来源:App.java

示例3: setDefaultAudience

点赞 2

import com.facebook.login.DefaultAudience; //导入依赖的package包/类
public void setDefaultAudience(DefaultAudience defaultAudience) {
    this.defaultAudience = defaultAudience;
}
 

开发者ID:eviltnan,
项目名称:kognitivo,
代码行数:4,
代码来源:LoginButton.java

示例4: getDefaultAudience

点赞 2

import com.facebook.login.DefaultAudience; //导入依赖的package包/类
public DefaultAudience getDefaultAudience() {
    return defaultAudience;
}
 

开发者ID:eviltnan,
项目名称:kognitivo,
代码行数:4,
代码来源:LoginButton.java

示例5: createProxyAuthIntent

点赞 2

import com.facebook.login.DefaultAudience; //导入依赖的package包/类
public static Intent createProxyAuthIntent(
        Context context,
        String applicationId,
        Collection<String> permissions,
        String e2e,
        boolean isRerequest,
        boolean isForPublish,
        DefaultAudience defaultAudience) {
    for (NativeAppInfo appInfo : facebookAppInfoList) {
        Intent intent = new Intent()
                .setClassName(appInfo.getPackage(), FACEBOOK_PROXY_AUTH_ACTIVITY)
                .putExtra(FACEBOOK_PROXY_AUTH_APP_ID_KEY, applicationId);

        if (!Utility.isNullOrEmpty(permissions)) {
            intent.putExtra(
                    FACEBOOK_PROXY_AUTH_PERMISSIONS_KEY, TextUtils.join(",", permissions));
        }
        if (!Utility.isNullOrEmpty(e2e)) {
            intent.putExtra(FACEBOOK_PROXY_AUTH_E2E_KEY, e2e);
        }

        intent.putExtra(
                ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE,
                ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN_AND_SIGNED_REQUEST);
        intent.putExtra(
                ServerProtocol.DIALOG_PARAM_RETURN_SCOPES,
                ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);
        if (isForPublish) {
            intent.putExtra(
                    ServerProtocol.DIALOG_PARAM_DEFAULT_AUDIENCE,
                    defaultAudience.getNativeProtocolAudience());
        }

        // Override the API Version for Auth
        intent.putExtra(
                ServerProtocol.DIALOG_PARAM_LEGACY_OVERRIDE,
                ServerProtocol.GRAPH_API_VERSION);

        // Set the re-request auth type for requests
        if (isRerequest) {
            intent.putExtra(
                    ServerProtocol.DIALOG_PARAM_AUTH_TYPE,
                    ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
        }

        intent = validateActivityIntent(context, intent, appInfo);

        if (intent != null) {
            return intent;
        }
    }
    return null;
}
 

开发者ID:eviltnan,
项目名称:kognitivo,
代码行数:54,
代码来源:NativeProtocol.java

示例6: setDefaultAudience

点赞 2

import com.facebook.login.DefaultAudience; //导入依赖的package包/类
/**
 * @param defaultAudience
 *            The defaultAudience to set.
 */
public Builder setDefaultAudience(DefaultAudience defaultAudience) {
    mDefaultAudience = defaultAudience;
    return this;
}
 

开发者ID:WassimBenltaief,
项目名称:ReactiveFB,
代码行数:9,
代码来源:SimpleFacebookConfiguration.java

示例7: createProxyAuthIntent

点赞 2

import com.facebook.login.DefaultAudience; //导入依赖的package包/类
public static Intent createProxyAuthIntent(
        Context context,
        String applicationId,
        Collection<String> permissions,
        String e2e,
        boolean isRerequest,
        DefaultAudience defaultAudience) {
    for (NativeAppInfo appInfo : facebookAppInfoList) {
        Intent intent = new Intent()
                .setClassName(appInfo.getPackage(), FACEBOOK_PROXY_AUTH_ACTIVITY)
                .putExtra(FACEBOOK_PROXY_AUTH_APP_ID_KEY, applicationId);

        if (!Utility.isNullOrEmpty(permissions)) {
            intent.putExtra(
                    FACEBOOK_PROXY_AUTH_PERMISSIONS_KEY, TextUtils.join(",", permissions));
        }
        if (!Utility.isNullOrEmpty(e2e)) {
            intent.putExtra(FACEBOOK_PROXY_AUTH_E2E_KEY, e2e);
        }

        intent.putExtra(
                ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE,
                ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN_AND_SIGNED_REQUEST);
        intent.putExtra(
                ServerProtocol.DIALOG_PARAM_RETURN_SCOPES,
                ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);
        intent.putExtra(
                ServerProtocol.DIALOG_PARAM_DEFAULT_AUDIENCE,
                defaultAudience.getNativeProtocolAudience());

        // Override the API Version for Auth
        intent.putExtra(
                ServerProtocol.DIALOG_PARAM_LEGACY_OVERRIDE,
                ServerProtocol.GRAPH_API_VERSION);

        // Set the re-request auth type for requests
        if (isRerequest) {
            intent.putExtra(
                    ServerProtocol.DIALOG_PARAM_AUTH_TYPE,
                    ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
        }

        intent = validateActivityIntent(context, intent, appInfo);

        if (intent != null) {
            return intent;
        }
    }
    return null;
}
 

开发者ID:CE-KMITL-OOAD-2015,
项目名称:Move-Alarm_ORCA,
代码行数:51,
代码来源:NativeProtocol.java

示例8: getDefaultAudience

点赞 1

import com.facebook.login.DefaultAudience; //导入依赖的package包/类
/**
 * Get session default audience
 *
 * @return
 */
DefaultAudience getDefaultAudience() {
    return mDefaultAudience;
}
 

开发者ID:WassimBenltaief,
项目名称:ReactiveFB,
代码行数:9,
代码来源:SimpleFacebookConfiguration.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)