1
私はTheta Camera SDKを使って360度の画像を撮影しています。Theta 360度写真をFacebookに投稿する
私はこの写真をFacebookに投稿します。これは360 photoです。その
のように私は._er_injectedと拡張子を変更していますが、同じ問題が発生する。それが成功のFacebookが、ビューに掲載された
String path= "/storage/emulated/0/path/imagebitmap.jpg";
SharePhoto photo = new SharePhoto.Builder()
.setImageUrl(Uri.fromFile(new File(path)))
.setCaption("")
.build();
SharePhotoContent content = new SharePhotoContent.Builder()
.addPhoto(photo)
.build();
ShareApi.share(content,shareCallback);
また、私は、私は間違った方法でAPIを呼び出すと思うこのコード
Bitmap icon = BitmapFactory.decodeResource(getResources(),R.drawable.imagebitmap);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
icon.compress(Bitmap.CompressFormat.PNG, 100, stream);
byte[] byteArray = stream.toByteArray();
Bundle params = new Bundle();
/*spherical_metadata*/
String mjson="{\"ProjectionType\": \"equirectangular\",\"CroppedAreaImageWidthPixels\": 240,\"CroppedAreaImageHeightPixels\": 240,\"FullPanoWidthPixels\": 1962,\"FullPanoHeightPixels\": 981,\"CroppedAreaLeftPixels\": 981,\"CroppedAreaTopPixels\": 490}";
params.putByteArray("picture", byteArray);
params.putBoolean("allow_spherical_photo", true);
params.putString("spherical_metadata", mjson);
params.putString("name", "Panorama images");
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/me/photos",
params,
HttpMethod.POST,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
Log.e("@@@response", String.valueOf(response));
// Toast.makeText()
}
}
).executeAsync();
を使用してください。