本文整理汇总了Java中com.facebook.Settings.getPlatformCompatibilityEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java Settings.getPlatformCompatibilityEnabled方法的具体用法?Java Settings.getPlatformCompatibilityEnabled怎么用?Java Settings.getPlatformCompatibilityEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.facebook.Settings
的用法示例。
在下文中一共展示了Settings.getPlatformCompatibilityEnabled方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createProxyAuthIntent
import com.facebook.Settings; //导入方法依赖的package包/类
public static Intent createProxyAuthIntent(Context context, String applicationId, List<String> permissions,
String e2e, boolean isRerequest, SessionDefaultAudience 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);
intent.putExtra(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);
intent.putExtra(ServerProtocol.DIALOG_PARAM_DEFAULT_AUDIENCE, defaultAudience.getNativeProtocolAudience());
if (!Settings.getPlatformCompatibilityEnabled()) {
// Override the API Version for Auth
intent.putExtra(ServerProtocol.DIALOG_PARAM_LEGACY_OVERRIDE, ServerProtocol.GRAPH_API_VERSION);
// Only set the rerequest auth type for non legacy 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;
}
示例2: getAPIVersion
import com.facebook.Settings; //导入方法依赖的package包/类
public static final String getAPIVersion() {
if (Settings.getPlatformCompatibilityEnabled()) {
return LEGACY_API_VERSION;
}
return GRAPH_API_VERSION;
}