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

前端 未结 2 887
你的背包
你的背包 2020-12-18 15:17

I am developing a game app. And I am sharing facebook custom stories in my app.I have created a self hosted object(html page).

I want to use that same self hosted ob

相关标签:
2条回答
  • 2020-12-18 15:59

    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

    0 讨论(0)
  • 2020-12-18 16:17

    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();
    
    0 讨论(0)
提交回复
热议问题