package com.facebook.share.internal; import android.os.Bundle; import com.facebook.FacebookException; import com.facebook.internal.Utility; import com.facebook.share.model.ShareContent; import com.facebook.share.model.ShareHashtag; import com.facebook.share.model.ShareLinkContent; import com.facebook.share.model.ShareOpenGraphContent; import com.facebook.share.model.SharePhoto; import com.facebook.share.model.SharePhotoContent; import com.tencent.open.SocialConstants; import com.ubt.jimu.base.entities.Constant; import com.unity3d.ads.metadata.MediationMetaData; import java.util.List; import org.json.JSONException; import org.json.JSONObject; /* loaded from: classes.dex */ public class WebDialogParameters { public static Bundle a(ShareLinkContent shareLinkContent) { Bundle a = a((ShareContent) shareLinkContent); Utility.a(a, "href", shareLinkContent.getContentUrl()); Utility.a(a, "quote", shareLinkContent.getQuote()); return a; } public static Bundle b(ShareLinkContent shareLinkContent) { Bundle bundle = new Bundle(); Utility.a(bundle, MediationMetaData.KEY_NAME, shareLinkContent.getContentTitle()); Utility.a(bundle, SocialConstants.PARAM_COMMENT, shareLinkContent.getContentDescription()); Utility.a(bundle, Constant.Community.SOURCE_LINK_TYPE, Utility.b(shareLinkContent.getContentUrl())); Utility.a(bundle, SocialConstants.PARAM_AVATAR_URI, Utility.b(shareLinkContent.getImageUrl())); Utility.a(bundle, "quote", shareLinkContent.getQuote()); if (shareLinkContent.getShareHashtag() != null) { Utility.a(bundle, "hashtag", shareLinkContent.getShareHashtag().getHashtag()); } return bundle; } public static Bundle a(ShareOpenGraphContent shareOpenGraphContent) { Bundle a = a((ShareContent) shareOpenGraphContent); Utility.a(a, "action_type", shareOpenGraphContent.getAction().getActionType()); try { JSONObject a2 = ShareInternalUtility.a(ShareInternalUtility.a(shareOpenGraphContent), false); if (a2 != null) { Utility.a(a, "action_properties", a2.toString()); } return a; } catch (JSONException e) { throw new FacebookException("Unable to serialize the ShareOpenGraphContent to JSON", e); } } public static Bundle a(SharePhotoContent sharePhotoContent) { Bundle a = a((ShareContent) sharePhotoContent); String[] strArr = new String[sharePhotoContent.getPhotos().size()]; Utility.a((List) sharePhotoContent.getPhotos(), (Utility.Mapper) new Utility.Mapper() { // from class: com.facebook.share.internal.WebDialogParameters.1 @Override // com.facebook.internal.Utility.Mapper /* renamed from: a, reason: merged with bridge method [inline-methods] */ public String apply(SharePhoto sharePhoto) { return sharePhoto.getImageUrl().toString(); } }).toArray(strArr); a.putStringArray("media", strArr); return a; } public static Bundle a(ShareContent shareContent) { Bundle bundle = new Bundle(); ShareHashtag shareHashtag = shareContent.getShareHashtag(); if (shareHashtag != null) { Utility.a(bundle, "hashtag", shareHashtag.getHashtag()); } return bundle; } public static Bundle a(ShareFeedContent shareFeedContent) { Bundle bundle = new Bundle(); Utility.a(bundle, "to", shareFeedContent.getToId()); Utility.a(bundle, Constant.Community.SOURCE_LINK_TYPE, shareFeedContent.getLink()); Utility.a(bundle, SocialConstants.PARAM_AVATAR_URI, shareFeedContent.getPicture()); Utility.a(bundle, SocialConstants.PARAM_SOURCE, shareFeedContent.getMediaSource()); Utility.a(bundle, MediationMetaData.KEY_NAME, shareFeedContent.getLinkName()); Utility.a(bundle, "caption", shareFeedContent.getLinkCaption()); Utility.a(bundle, SocialConstants.PARAM_COMMENT, shareFeedContent.getLinkDescription()); return bundle; } }