0
我無法在Open Graph故事中發佈從相機或本地存儲中獲取的圖像。無法使用OpenGraph將圖像從內存發佈到Facebook
下面是代碼
OpenGraphObject exercise = OpenGraphObject.Factory
.createForPost("my-app-share:exercise");
exercise.setProperty("title", "Title");
exercise.setProperty("description", "description");
OpenGraphAction action = GraphObject.Factory
.create(OpenGraphAction.class);
action.setProperty("exercise", exercise);
List<Bitmap> images = new ArrayList<Bitmap>();
Bitmap image = decodeBitmapFromFilepath(imgPath);
images.add(image);
FacebookDialog shareDialog = new FacebookDialog.OpenGraphActionDialogBuilder(
getActivity(), action, "my-app-share:use", "exercise")
.setImageAttachmentsForObject("exercise", images, true)
.build();
ExerciseActivity.getUiHelper().trackPendingDialogCall(shareDialog.present());
的事情是,當我不包括
.setImageAttachmentsForObject("exercise", images, true)
一切正常,FB打開,並呈現劇情的預期。
只要我的廣告上面的線,我得到了我的logcat的一個FacebookError沒有解釋