com.facebook.internal.Utility.safeGetStringFromResponse()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(81)

本文整理了Java中com.facebook.internal.Utility.safeGetStringFromResponse()方法的一些代码示例,展示了Utility.safeGetStringFromResponse()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utility.safeGetStringFromResponse()方法的具体详情如下:
包路径:com.facebook.internal.Utility
类名称:Utility
方法名:safeGetStringFromResponse

Utility.safeGetStringFromResponse介绍

暂无

代码示例

代码示例来源:origin: facebook/facebook-android-sdk

@Override
protected void processSuccess(GraphResponse response) {
  unlikeToken = Utility.safeGetStringFromResponse(response.getJSONObject(), "id");
}

代码示例来源:origin: fr.avianey/facebook-android-api

public static FetchedAppSettings queryAppSettings(final String applicationId, final boolean forceRequery) {
  // Cache the last app checked results.
  if (!forceRequery && fetchedAppSettings.containsKey(applicationId)) {
    return fetchedAppSettings.get(applicationId);
  }
  Bundle appSettingsParams = new Bundle();
  appSettingsParams.putString(APPLICATION_FIELDS, TextUtils.join(",", APP_SETTING_FIELDS));
  Request request = Request.newGraphPathRequest(null, applicationId, null);
  request.setParameters(appSettingsParams);
  GraphObject supportResponse = request.executeAndWait().getGraphObject();
  FetchedAppSettings result = new FetchedAppSettings(
      safeGetBooleanFromResponse(supportResponse, SUPPORTS_ATTRIBUTION),
      safeGetBooleanFromResponse(supportResponse, SUPPORTS_IMPLICIT_SDK_LOGGING),
      safeGetStringFromResponse(supportResponse, NUX_CONTENT),
      safeGetBooleanFromResponse(supportResponse, NUX_ENABLED)
      );
  fetchedAppSettings.put(applicationId, result);
  return result;
}

相关文章