Android SDK Version


public final class ShareInternalUtility
com.facebook.share.internal is solely for the use of other packages within the Facebook SDK for Android. Use of any of the classes in this package is unsupported, and they may be modified or removed without warning at any time.
Field Summary
Modifier and TypeFieldDescription
public final static StringMY_PHOTOS
Method Summary
Modifier and TypeMethodDescription
static voidinvokeCallbackWithException(FacebookCallback<Sharer.Result> callback, Exception exception)
static voidinvokeCallbackWithError(FacebookCallback<Sharer.Result> callback, String error)
static voidinvokeCallbackWithResults(FacebookCallback<Sharer.Result> callback, String postId, GraphResponse graphResponse)
static StringgetNativeDialogCompletionGesture(Bundle result) Returns the gesture with which the user completed the native dialog.
static StringgetShareDialogPostId(Bundle result) Returns the id of the published post.
static booleanhandleActivityResult(int requestCode, int resultCode, Intent data, ResultProcessor resultProcessor)
static ResultProcessorgetShareResultProcessor(FacebookCallback<Sharer.Result> callback)
static voidregisterStaticShareCallback(int requestCode)
static voidregisterSharerCallback(int requestCode, CallbackManager callbackManager, FacebookCallback<Sharer.Result> callback)
static List<String>getPhotoUrls(SharePhotoContent photoContent, UUID appCallId)
static StringgetVideoUrl(ShareVideoContent videoContent, UUID appCallId)
static List<Bundle>getMediaInfos(ShareMediaContent mediaContent, UUID appCallId)
static BundlegetTextureUrlBundle(ShareCameraEffectContent cameraEffectContent, UUID appCallId)
static JSONObjecttoJSONObjectForCall(UUID callId, ShareOpenGraphContent content)
static JSONObjecttoJSONObjectForWeb(ShareOpenGraphContent shareOpenGraphContent)
static JSONArrayremoveNamespacesFromOGJsonArray(JSONArray jsonArray, boolean requireNamespace)
static JSONObjectremoveNamespacesFromOGJsonObject(JSONObject jsonObject, boolean requireNamespace)
static Pair<String, String>getFieldNameAndNamespaceFromFullName(String fullName)
static GraphRequestnewUploadStagingResourceWithImageRequest(AccessToken accessToken, Bitmap image, GraphRequest.Callback callback) Creates a new Request configured to upload an image to create a staging resource.
static GraphRequestnewUploadStagingResourceWithImageRequest(AccessToken accessToken, File file, GraphRequest.Callback callback) Creates a new Request configured to upload an image to create a staging resource.
static GraphRequestnewUploadStagingResourceWithImageRequest(AccessToken accessToken, Uri imageUri, GraphRequest.Callback callback) Creates a new Request configured to upload an image to create a staging resource.
static LikeView.ObjectTypegetMostSpecificObjectType(LikeView.ObjectType objectType1, LikeView.ObjectType objectType2)
static BundlegetStickerUrl(ShareStoryContent storyContent, UUID appCallId)
static BundlegetBackgroundAssetMediaInfo(ShareStoryContent storyContent, UUID appCallId)
static StringgetUriExtension(Uri uri)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Method Detail

invokeCallbackWithException

 static void invokeCallbackWithException(FacebookCallback<Sharer.Result> callback, Exception exception)

invokeCallbackWithError

 static void invokeCallbackWithError(FacebookCallback<Sharer.Result> callback, String error)

invokeCallbackWithResults

 static void invokeCallbackWithResults(FacebookCallback<Sharer.Result> callback, String postId, GraphResponse graphResponse)

getNativeDialogCompletionGesture

 static StringgetNativeDialogCompletionGesture(Bundle result)
Returns the gesture with which the user completed the native dialog. This is only returned ifthe user has previously authorized the calling app with basic permissions.
Parameters:
result - the bundle passed back to onActivityResult

getShareDialogPostId

 static StringgetShareDialogPostId(Bundle result)
Returns the id of the published post. This is only returned if the user has previously giventhe app publish permissions.
Parameters:
result - the bundle passed back to onActivityResult

handleActivityResult

 static boolean handleActivityResult(int requestCode, int resultCode, Intent data, ResultProcessor resultProcessor)

getShareResultProcessor

 static ResultProcessorgetShareResultProcessor(FacebookCallback<Sharer.Result> callback)

registerStaticShareCallback

 static void registerStaticShareCallback(int requestCode)

registerSharerCallback

 static void registerSharerCallback(int requestCode, CallbackManager callbackManager, FacebookCallback<Sharer.Result> callback)

getPhotoUrls

 static List<String> getPhotoUrls(SharePhotoContent photoContent, UUID appCallId)

getVideoUrl

 static StringgetVideoUrl(ShareVideoContent videoContent, UUID appCallId)

getMediaInfos

 static List<Bundle> getMediaInfos(ShareMediaContent mediaContent, UUID appCallId)

getTextureUrlBundle

 static BundlegetTextureUrlBundle(ShareCameraEffectContent cameraEffectContent, UUID appCallId)

toJSONObjectForCall

 static JSONObjecttoJSONObjectForCall(UUID callId, ShareOpenGraphContent content)

toJSONObjectForWeb

 static JSONObjecttoJSONObjectForWeb(ShareOpenGraphContent shareOpenGraphContent)

removeNamespacesFromOGJsonArray

 static JSONArrayremoveNamespacesFromOGJsonArray(JSONArray jsonArray, boolean requireNamespace)

removeNamespacesFromOGJsonObject

 static JSONObjectremoveNamespacesFromOGJsonObject(JSONObject jsonObject, boolean requireNamespace)

getFieldNameAndNamespaceFromFullName

 static Pair<String, String> getFieldNameAndNamespaceFromFullName(String fullName)

newUploadStagingResourceWithImageRequest

 static GraphRequestnewUploadStagingResourceWithImageRequest(AccessToken accessToken, Bitmap image, GraphRequest.Callback callback)
Creates a new Request configured to upload an image to create a staging resource. Stagingresources allow you to post binary data such as images, in preparation for a post of an OpenGraph object or action which references the image. The URI returned when uploading a stagingresource may be passed as the image property for an Open Graph object or action.
Parameters:
accessToken - the access token to use, or null
image - the image to upload
callback - a callback that will be called when the request is completed to handle successor error conditions

newUploadStagingResourceWithImageRequest

 static GraphRequestnewUploadStagingResourceWithImageRequest(AccessToken accessToken, File file, GraphRequest.Callback callback)
Creates a new Request configured to upload an image to create a staging resource. Stagingresources allow you to post binary data such as images, in preparation for a post of an OpenGraph object or action which references the image. The URI returned when uploading a stagingresource may be passed as the image property for an Open Graph object or action.
Parameters:
accessToken - the access token to use, or null
file - the file containing the image to upload
callback - a callback that will be called when the request is completed to handle successor error conditions

newUploadStagingResourceWithImageRequest

 static GraphRequestnewUploadStagingResourceWithImageRequest(AccessToken accessToken, Uri imageUri, GraphRequest.Callback callback)
Creates a new Request configured to upload an image to create a staging resource. Stagingresources allow you to post binary data such as images, in preparation for a post of an OpenGraph object or action which references the image. The URI returned when uploading a stagingresource may be passed as the image property for an Open Graph object or action.
Parameters:
accessToken - the access token to use, or null
imageUri - the file:// or content:// Uri pointing to the image to upload
callback - a callback that will be called when the request is completed to handle successor error conditions

getMostSpecificObjectType

@Nullable() static LikeView.ObjectTypegetMostSpecificObjectType(LikeView.ObjectType objectType1, LikeView.ObjectType objectType2)

getStickerUrl

@Nullable() static BundlegetStickerUrl(ShareStoryContent storyContent, UUID appCallId)

getBackgroundAssetMediaInfo

@Nullable() static BundlegetBackgroundAssetMediaInfo(ShareStoryContent storyContent, UUID appCallId)

getUriExtension

@Nullable() static StringgetUriExtension(Uri uri)