本文整理匯總了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;
}