1
나는 Theta Camera SDK를 사용하여 360 도의 각도로 사진을 찍습니다.페이스 북에 Theta 360 ° 사진을 게시하는 방법
이 사진을 Facebook에 게시하고 싶습니다. 360 사진입니다.
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);
그것은 성공적으로
저도 같은 문제가 발생 ._er_injected 만에 확장을 변경하고 같은 페이스 북 있지만보기에 게시했습니다.
또한이 코드
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();
내가 잘못된 방법으로 API를 호출하고 생각을 사용합니다.