Is it possible to upload image to user wall or page or group so it open external url when the user click on it?
I found this exmaple in Facebook SDK tutorials by it doesn't take url
private void postPhoto() {
Bitmap image = BitmapFactory.decodeResource(this.getResources(), R.drawable.icon);
if (canPresentShareDialogWithPhotos) {
FacebookDialog shareDialog = createShareDialogBuilderForPhoto(image).build();
uiHelper.trackPendingDialogCall(shareDialog.present());
} else if (hasPublishPermission()) {
Request request = Request.newUploadPhotoRequest(Session.getActiveSession(), image, new Request.Callback() {
@Override
public void onCompleted(Response response) {
showPublishResult(getString(R.string.photo_post), response.getGraphObject(), response.getError());
}
});
request.executeAsync();
} else {
pendingAction = PendingAction.POST_PHOTO;
}
}
Is there any suggestions
Thanks
It's not possible. Clicking a photo on Facebook will always open that photo's view. You can include an URL in the photo's description but that's about it. Facebook will parse it just fine and wrap it in an anchor tag.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.