更新时间:2023-01-01 20:32:52
您不能只是把以捆绑一个开放的图形对象/动作。
You can't just put an open graph object/action in a Bundle.
首先,你需要创建一个OpenGraphObject:
First you need to create an OpenGraphObject:
OpenGraphObject object = OpenGraphObject.Factory.createForPost("yournamespace:objectname");
object.setTitle("Sample Trophy");
object.setDescription("...");
//... set more properties as necessary
然后创建一个OpenGraphAction和你的对象添加到它:
Then create an OpenGraphAction and add your object to it:
OpenGraphAction action = OpenGraphAction.Factory.createForPost("thebigtoss:win");
action.setProperty("trophy", object);
最后,使用newPostOpenGraphActionRequest方法,它张贴:
Finally, post it using the newPostOpenGraphActionRequest method:
Request request = Request.newPostOpenGraphActionRequest(session, action, new Callback() {...});