I'm trying to share a photo using Facebook's new SharePhoto & SharePhotoContent classes in the new SDK. I'd like to use an image URL instead of a locally stored image.
I am able to share an image using a locally stored drawable resource:
Bitmap image = BitmapFactory.decodeResource(getResources(), R.drawable.carrots);
SharePhoto photo = new SharePhoto.Builder()
.setImageBitmap(image)
.build();
SharePhotoContent content = new SharePhotoContent.Builder()
.addPhoto(photo)
.build();
shareDialog.show(content);
But when I try to use an image URL :
SharePhoto photo = new SharePhoto.Builder()
.setImageUrl(Uri.parse("http://s3-ak.buzzfed.com/static/images/public/verticals/food-title.png?v=201504021353"))
.build();
all I'm seeing is a blank post in the Facebook shareDialog.
Has anyone else tried this and gotten it to work?
Many thanks!