本文整理匯總了Java中com.facebook.internal.Utility.putNonEmptyString方法的典型用法代碼示例。如果您正苦於以下問題:Java Utility.putNonEmptyString方法的具體用法?Java Utility.putNonEmptyString怎麽用?Java Utility.putNonEmptyString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.facebook.internal.Utility
的用法示例。
在下文中一共展示了Utility.putNonEmptyString方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: create
import com.facebook.internal.Utility; //導入方法依賴的package包/類
public static Bundle create(AppGroupCreationContent appGroupCreationContent) {
Bundle webParams = new Bundle();
Utility.putNonEmptyString(
webParams,
ShareConstants.WEB_DIALOG_PARAM_NAME,
appGroupCreationContent.getName());
Utility.putNonEmptyString(
webParams,
ShareConstants.WEB_DIALOG_PARAM_DESCRIPTION,
appGroupCreationContent.getDescription());
AppGroupCreationContent.AppGroupPrivacy privacy =
appGroupCreationContent.getAppGroupPrivacy();
if (privacy != null) {
Utility.putNonEmptyString(
webParams,
ShareConstants.WEB_DIALOG_PARAM_PRIVACY,
privacy.toString().toLowerCase(Locale.ENGLISH));
}
return webParams;
}
示例2: createForFeed
import com.facebook.internal.Utility; //導入方法依賴的package包/類
public static Bundle createForFeed(ShareLinkContent shareLinkContent) {
Bundle webParams = new Bundle();
Utility.putNonEmptyString(
webParams,
ShareConstants.WEB_DIALOG_PARAM_NAME,
shareLinkContent.getContentTitle());
Utility.putNonEmptyString(
webParams,
ShareConstants.WEB_DIALOG_PARAM_DESCRIPTION,
shareLinkContent.getContentDescription());
Utility.putNonEmptyString(
webParams,
ShareConstants.WEB_DIALOG_PARAM_LINK,
Utility.getUriString(shareLinkContent.getContentUrl()));
Utility.putNonEmptyString(
webParams,
ShareConstants.WEB_DIALOG_PARAM_PICTURE,
Utility.getUriString(shareLinkContent.getImageUrl()));
return webParams;
}
示例3: create
import com.facebook.internal.Utility; //導入方法依賴的package包/類
private static Bundle create(
ShareOpenGraphContent openGraphContent,
JSONObject openGraphActionJSON,
boolean dataErrorsFatal) {
Bundle params = createBaseParameters(openGraphContent, dataErrorsFatal);
// Strip namespace from preview property name
String previewProperty = ShareInternalUtility.getFieldNameAndNamespaceFromFullName(
openGraphContent.getPreviewPropertyName()).second;
Utility.putNonEmptyString(
params,
ShareConstants.PREVIEW_PROPERTY_NAME,
previewProperty);
Utility.putNonEmptyString(
params,
ShareConstants.ACTION_TYPE,
openGraphContent.getAction().getActionType());
Utility.putNonEmptyString(
params,
ShareConstants.ACTION,
openGraphActionJSON.toString());
return params;
}
示例4: createBaseParameters
import com.facebook.internal.Utility; //導入方法依賴的package包/類
private static Bundle createBaseParameters(ShareContent content, boolean dataErrorsFatal) {
Bundle params = new Bundle();
Utility.putUri(params, ShareConstants.CONTENT_URL, content.getContentUrl());
Utility.putNonEmptyString(params, ShareConstants.PLACE_ID, content.getPlaceId());
Utility.putNonEmptyString(params, ShareConstants.REF, content.getRef());
params.putBoolean(ShareConstants.DATA_FAILURES_FATAL, dataErrorsFatal);
List<String> peopleIds = content.getPeopleIds();
if (!Utility.isNullOrEmpty(peopleIds)) {
params.putStringArrayList(
ShareConstants.PEOPLE_IDS,
new ArrayList<String>(peopleIds));
}
return params;
}
示例5: create
import com.facebook.internal.Utility; //導入方法依賴的package包/類
private static Bundle create(
ShareOpenGraphContent openGraphContent,
JSONObject openGraphActionJSON,
boolean dataErrorsFatal) {
Bundle params = createBaseParameters(openGraphContent, dataErrorsFatal);
Utility.putNonEmptyString(
params,
ShareConstants.LEGACY_PREVIEW_PROPERTY_NAME,
openGraphContent.getPreviewPropertyName());
Utility.putNonEmptyString(
params,
ShareConstants.LEGACY_ACTION_TYPE,
openGraphContent.getAction().getActionType());
Utility.putNonEmptyString(
params,
ShareConstants.LEGACY_ACTION,
openGraphActionJSON.toString());
return params;
}
示例6: createBaseParameters
import com.facebook.internal.Utility; //導入方法依賴的package包/類
private static Bundle createBaseParameters(ShareContent content, boolean dataErrorsFatal) {
Bundle params = new Bundle();
Utility.putUri(params, ShareConstants.LEGACY_LINK, content.getContentUrl());
Utility.putNonEmptyString(params, ShareConstants.LEGACY_PLACE_TAG, content.getPlaceId());
Utility.putNonEmptyString(params, ShareConstants.LEGACY_REF, content.getRef());
params.putBoolean(ShareConstants.LEGACY_DATA_FAILURES_FATAL, dataErrorsFatal);
List<String> peopleIds = content.getPeopleIds();
if (!Utility.isNullOrEmpty(peopleIds)) {
params.putStringArrayList(
ShareConstants.LEGACY_FRIEND_TAGS,
new ArrayList<>(peopleIds));
}
return params;
}
示例7: getParameters
import com.facebook.internal.Utility; //導入方法依賴的package包/類
@Override
public Bundle getParameters() {
Bundle parameters = new Bundle();
if (uploadContext.params != null) {
parameters.putAll(uploadContext.params);
}
parameters.putString(PARAM_UPLOAD_PHASE, PARAM_VALUE_UPLOAD_FINISH_PHASE);
parameters.putString(PARAM_SESSION_ID, uploadContext.sessionId);
Utility.putNonEmptyString(parameters, PARAM_TITLE, uploadContext.title);
Utility.putNonEmptyString(parameters, PARAM_DESCRIPTION, uploadContext.description);
Utility.putNonEmptyString(parameters, PARAM_REF, uploadContext.ref);
return parameters;
}