How to create and use self hosted objects to share custom stories in Android?

南笙酒味 提交于 2019-11-29 08:50:01

Finally I solved it , actually method was there in the document itself , but it wasn't specifically mentioned there that this code will be used for self hosted object.

Below is my code :

OpenGraphAction action = GraphObject.Factory.create(OpenGraphAction.class);
action.setProperty("level","https://example.com/namespace/level.html");   //here "level" is the Object name and url is the self hosted object
action.setType("namespace:unlock");    //"unlock" is the Action name
FacebookDialog shareDialog = new FacebookDialog.OpenGraphActionDialogBuilder(FBActivity.this, action, "level").build();

There is an example of using a URL (self hosted object) in the FB docs. Although they now refer to it as an app owned object. Just about to test it.

https://developers.facebook.com/docs/ios/ui-controls#share-appownedobjects

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