我使用自定义图表api发布故事。在发布故事时,API始终会选择“一对一 - 没有对象标题”#34;而不是"一对一"。我需要选择"一对一"因为它可以选择更新" level.title"。
// Create an object
ShareOpenGraphObject object = new ShareOpenGraphObject.Builder()
.putString("og:type", "puzzlegameballmania:level")
.putString("og:title", "Puzzle Game - Ball Mania")
.putString("og:image", "http://i67.tinypic.com/svl2qt.png")
.putString("og:url", "https://play.google.com/store/apps/details?id=memory.game.collection.free")
.putString("og:description", "Color of the balls matters more. Lets break the goal and go higher !")
.putString("puzzlegameballmania:level:title", "LEVEL 1")
.build();
// Create an action
ShareOpenGraphAction action = new ShareOpenGraphAction.Builder()
.setActionType("puzzlegameballmania:clear")
.putObject("puzzlegameballmania:level", object)
.build();
// Create the content
ShareOpenGraphContent content = new ShareOpenGraphContent.Builder()
.setPreviewPropertyName("puzzlegameballmania:level")
.setAction(action)
.build();
ShareDialog.show(AndroidLauncher.this, content);