public final class ShareInternalUtility
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MY_PHOTOS |
| Constructor and Description |
|---|
ShareInternalUtility() |
| Modifier and Type | Method and Description |
|---|---|
static android.os.Bundle |
getBackgroundAssetMediaInfo(ShareStoryContent storyContent,
java.util.UUID appCallId) |
static android.util.Pair<java.lang.String,java.lang.String> |
getFieldNameAndNamespaceFromFullName(java.lang.String fullName) |
static java.util.List<android.os.Bundle> |
getMediaInfos(ShareMediaContent mediaContent,
java.util.UUID appCallId) |
static LikeView.ObjectType |
getMostSpecificObjectType(LikeView.ObjectType objectType1,
LikeView.ObjectType objectType2) |
static java.lang.String |
getNativeDialogCompletionGesture(android.os.Bundle result)
Returns the gesture with which the user completed the native dialog.
|
static java.util.List<java.lang.String> |
getPhotoUrls(SharePhotoContent photoContent,
java.util.UUID appCallId) |
static java.lang.String |
getShareDialogPostId(android.os.Bundle result)
Returns the id of the published post.
|
static ResultProcessor |
getShareResultProcessor(FacebookCallback<Sharer.Result> callback) |
static android.os.Bundle |
getStickerUrl(ShareStoryContent storyContent,
java.util.UUID appCallId) |
static android.os.Bundle |
getTextureUrlBundle(ShareCameraEffectContent cameraEffectContent,
java.util.UUID appCallId) |
static java.lang.String |
getUriExtension(android.net.Uri uri) |
static java.lang.String |
getVideoUrl(ShareVideoContent videoContent,
java.util.UUID appCallId) |
static boolean |
handleActivityResult(int requestCode,
int resultCode,
android.content.Intent data,
ResultProcessor resultProcessor) |
static void |
invokeCallbackWithError(FacebookCallback<Sharer.Result> callback,
java.lang.String error) |
static void |
invokeCallbackWithException(FacebookCallback<Sharer.Result> callback,
java.lang.Exception exception) |
static void |
invokeCallbackWithResults(FacebookCallback<Sharer.Result> callback,
java.lang.String postId,
com.facebook.GraphResponse graphResponse) |
static com.facebook.GraphRequest |
newUploadStagingResourceWithImageRequest(com.facebook.AccessToken accessToken,
android.graphics.Bitmap image,
com.facebook.GraphRequest.Callback callback)
Creates a new Request configured to upload an image to create a staging resource.
|
static com.facebook.GraphRequest |
newUploadStagingResourceWithImageRequest(com.facebook.AccessToken accessToken,
java.io.File file,
com.facebook.GraphRequest.Callback callback)
Creates a new Request configured to upload an image to create a staging resource.
|
static com.facebook.GraphRequest |
newUploadStagingResourceWithImageRequest(com.facebook.AccessToken accessToken,
android.net.Uri imageUri,
com.facebook.GraphRequest.Callback callback)
Creates a new Request configured to upload an image to create a staging resource.
|
static void |
registerSharerCallback(int requestCode,
com.facebook.CallbackManager callbackManager,
FacebookCallback<Sharer.Result> callback) |
static void |
registerStaticShareCallback(int requestCode) |
static org.json.JSONArray |
removeNamespacesFromOGJsonArray(org.json.JSONArray jsonArray,
boolean requireNamespace) |
static org.json.JSONObject |
removeNamespacesFromOGJsonObject(org.json.JSONObject jsonObject,
boolean requireNamespace) |
static org.json.JSONObject |
toJSONObjectForCall(java.util.UUID callId,
ShareOpenGraphContent content) |
static org.json.JSONObject |
toJSONObjectForWeb(ShareOpenGraphContent shareOpenGraphContent) |
public static final java.lang.String MY_PHOTOS
public static void invokeCallbackWithException(FacebookCallback<Sharer.Result> callback, java.lang.Exception exception)
public static void invokeCallbackWithError(FacebookCallback<Sharer.Result> callback, java.lang.String error)
public static void invokeCallbackWithResults(FacebookCallback<Sharer.Result> callback, java.lang.String postId, com.facebook.GraphResponse graphResponse)
public static java.lang.String getNativeDialogCompletionGesture(android.os.Bundle result)
result - the bundle passed back to onActivityResultpublic static java.lang.String getShareDialogPostId(android.os.Bundle result)
result - the bundle passed back to onActivityResultpublic static boolean handleActivityResult(int requestCode,
int resultCode,
android.content.Intent data,
ResultProcessor resultProcessor)
public static ResultProcessor getShareResultProcessor(FacebookCallback<Sharer.Result> callback)
public static void registerStaticShareCallback(int requestCode)
public static void registerSharerCallback(int requestCode,
com.facebook.CallbackManager callbackManager,
FacebookCallback<Sharer.Result> callback)
public static java.util.List<java.lang.String> getPhotoUrls(SharePhotoContent photoContent, java.util.UUID appCallId)
public static java.lang.String getVideoUrl(ShareVideoContent videoContent, java.util.UUID appCallId)
public static java.util.List<android.os.Bundle> getMediaInfos(ShareMediaContent mediaContent, java.util.UUID appCallId)
public static android.os.Bundle getTextureUrlBundle(ShareCameraEffectContent cameraEffectContent, java.util.UUID appCallId)
public static org.json.JSONObject toJSONObjectForCall(java.util.UUID callId,
ShareOpenGraphContent content)
throws org.json.JSONException
org.json.JSONExceptionpublic static org.json.JSONObject toJSONObjectForWeb(ShareOpenGraphContent shareOpenGraphContent) throws org.json.JSONException
org.json.JSONExceptionpublic static org.json.JSONArray removeNamespacesFromOGJsonArray(org.json.JSONArray jsonArray,
boolean requireNamespace)
throws org.json.JSONException
org.json.JSONExceptionpublic static org.json.JSONObject removeNamespacesFromOGJsonObject(org.json.JSONObject jsonObject,
boolean requireNamespace)
public static android.util.Pair<java.lang.String,java.lang.String> getFieldNameAndNamespaceFromFullName(java.lang.String fullName)
public static com.facebook.GraphRequest newUploadStagingResourceWithImageRequest(com.facebook.AccessToken accessToken,
android.graphics.Bitmap image,
com.facebook.GraphRequest.Callback callback)
accessToken - the access token to use, or nullimage - the image to uploadcallback - a callback that will be called when the request is completed to handle
success or error conditionspublic static com.facebook.GraphRequest newUploadStagingResourceWithImageRequest(com.facebook.AccessToken accessToken,
java.io.File file,
com.facebook.GraphRequest.Callback callback)
throws java.io.FileNotFoundException
accessToken - the access token to use, or nullfile - the file containing the image to uploadcallback - a callback that will be called when the request is completed to handle
success or error conditionsjava.io.FileNotFoundExceptionpublic static com.facebook.GraphRequest newUploadStagingResourceWithImageRequest(com.facebook.AccessToken accessToken,
android.net.Uri imageUri,
com.facebook.GraphRequest.Callback callback)
throws java.io.FileNotFoundException
accessToken - the access token to use, or nullimageUri - the file:// or content:// Uri pointing to the image to uploadcallback - a callback that will be called when the request is completed to handle
success or error conditionsjava.io.FileNotFoundException@Nullable public static LikeView.ObjectType getMostSpecificObjectType(LikeView.ObjectType objectType1, LikeView.ObjectType objectType2)
@Nullable public static android.os.Bundle getStickerUrl(ShareStoryContent storyContent, java.util.UUID appCallId)
@Nullable public static android.os.Bundle getBackgroundAssetMediaInfo(ShareStoryContent storyContent, java.util.UUID appCallId)
@Nullable public static java.lang.String getUriExtension(android.net.Uri uri)