Posting user_generated photo from new native Share Dialog in FacebookSDK on android

我的梦境 提交于 2019-12-08 06:11:36

问题


I'm, trying to post an image to the Facebook (with OpenGraph) using new SDK v3.5 Share Dialog described here

As a result I'm getting com.facebook.FacebookException: Error retrieving image attachment.

The image is added to the dialog like described in the documentation:

List<Bitmap> bitmaps = new ArrayList<Bitmap>();
bitmaps.add(bitmap);

FacebookDialog shareDialog = new FacebookDialog.OpenGraphActionDialogBuilder(ShareAwardActivity.this, action, "my_app:my_action", "my_object")
  .setImageAttachmentsForObject("my_object", bitmaps, true)
  .build();
facebookHelper.trackPendingDialogCall(shareDialog.present());

It looks like SDK stores image in the cache folder to be read by Facebook app, but Facebook app can't read or upload it somehow.

I tried setImageAttachmentsForAction - didn't help.

Also tried to add the image url to my_object - it doesn't respect the user_generated flag

Does anyone succeeded in doing this?

来源:https://stackoverflow.com/questions/18496508/posting-user-generated-photo-from-new-native-share-dialog-in-facebooksdk-on-andr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!