新しい SDK で Facebook の新しい SharePhoto & SharePhotoContent クラスを使用して写真を共有しようとしています。ローカルに保存された画像ではなく、画像の URL を使用したいと考えています。
ローカルに保存されたドローアブル リソースを使用して画像を共有できます。
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);
しかし、画像の URL を使用しようとすると:
SharePhoto photo = new SharePhoto.Builder()
.setImageUrl(Uri.parse("http://s3-ak.buzzfed.com/static/images/public/verticals/food-title.png?v=201504021353"))
.build();
私が見ているのは、Facebook shareDialog の空白の投稿だけです。
他の誰かがこれを試して動作させましたか?
どうもありがとう!