當前位置: 首頁>>代碼示例>>Java>>正文


Java Utility.putNonEmptyString方法代碼示例

本文整理匯總了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;
}
 
開發者ID:eviltnan,項目名稱:kognitivo,代碼行數:25,代碼來源:WebDialogParameters.java

示例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;
}
 
開發者ID:eviltnan,項目名稱:kognitivo,代碼行數:26,代碼來源:WebDialogParameters.java

示例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;
}
 
開發者ID:eviltnan,項目名稱:kognitivo,代碼行數:27,代碼來源:NativeDialogParameters.java

示例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;
}
 
開發者ID:eviltnan,項目名稱:kognitivo,代碼行數:19,代碼來源:NativeDialogParameters.java

示例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;
}
 
開發者ID:eviltnan,項目名稱:kognitivo,代碼行數:23,代碼來源:LegacyNativeDialogParameters.java

示例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;
}
 
開發者ID:eviltnan,項目名稱:kognitivo,代碼行數:19,代碼來源:LegacyNativeDialogParameters.java

示例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;
}
 
開發者ID:eviltnan,項目名稱:kognitivo,代碼行數:15,代碼來源:VideoUploader.java


注:本文中的com.facebook.internal.Utility.putNonEmptyString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。