我正在开发一个android应用程序,并且已经将所有东西都连接到了facebook上,并成功地分享了一个对话框,并为一个页面点赞。现在我想使用开放图形api发布到feed,因为我想以我自己的格式发布所有内容,包括图像、标题、坐标和一小段描述。我已经创建了自定义的open graph storie,但我无法做到这一点。将立即打开和关闭共享对话框
命名空间是roteiroobidos
Actiontype为Share
对象类型为Interesting_place
ShareOpenGraphObject object = new ShareOpenGraphObject.Builder()
.putString("og:type", "obidosroteiro.share")
.build();
ShareOpenGraphAction action = new ShareOpenGraphAction.Builder()
.setActionType("obidosroteiro.share") //If i try to change any of these "share" the share dialog would not even open
.putObject("obidosroteiro:share", object)
.build();
ShareOpenGraphContent content = new ShareOpenGraphContent.Builder()
.setPreviewPropertyName("obidosroteiro:share")
.setAction(action)
.build();谢谢
发布于 2016-03-03 20:50:03
您必须使用:而不是来更改调用对象/操作的方式。此外,setPreviewPropertyName()还应包含对象的名称,在本例中为share。
更改为以下内容:
ShareOpenGraphObject object = new ShareOpenGraphObject.Builder()
.putString("og:type", "obidosroteiro:share")
.build();
ShareOpenGraphAction action = new ShareOpenGraphAction.Builder()
.setActionType("obidosroteiro:share") //If i try to change any of these "share" the share dialog would not even open
.putObject("obidosroteiro:share", object)
.build();
ShareOpenGraphContent content = new ShareOpenGraphContent.Builder()
.setPreviewPropertyName("share")
.setAction(action)
.build();https://stackoverflow.com/questions/30505444
复制相似问题