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.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 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,
GraphResponse graphResponse) |
static GraphRequest |
newUploadStagingResourceWithImageRequest(AccessToken accessToken,
android.graphics.Bitmap image,
GraphRequest.Callback callback)
Creates a new Request configured to upload an image to create a staging resource.
|
static GraphRequest |
newUploadStagingResourceWithImageRequest(AccessToken accessToken,
java.io.File file,
GraphRequest.Callback callback)
Creates a new Request configured to upload an image to create a staging resource.
|
static GraphRequest |
newUploadStagingResourceWithImageRequest(AccessToken accessToken,
android.net.Uri imageUri,
GraphRequest.Callback callback)
Creates a new Request configured to upload an image to create a staging resource.
|
static void |
registerSharerCallback(int requestCode,
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, 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, 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 org.json.JSONObject toJSONObjectForCall(java.util.UUID callId, ShareOpenGraphContent content) throws org.json.JSONException
org.json.JSONException
public static org.json.JSONObject toJSONObjectForWeb(ShareOpenGraphContent shareOpenGraphContent) throws org.json.JSONException
org.json.JSONException
public static org.json.JSONArray removeNamespacesFromOGJsonArray(org.json.JSONArray jsonArray, boolean requireNamespace) throws org.json.JSONException
org.json.JSONException
public 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 GraphRequest newUploadStagingResourceWithImageRequest(AccessToken accessToken, android.graphics.Bitmap image, 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 GraphRequest newUploadStagingResourceWithImageRequest(AccessToken accessToken, java.io.File file, 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.FileNotFoundException
public static GraphRequest newUploadStagingResourceWithImageRequest(AccessToken accessToken, android.net.Uri imageUri, 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)