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

前端 未结 2 915
你的背包
你的背包 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 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();
    

提交回复
热议问题