Facebook Share Dialog failing to recognize custom reference objects when posting custom Open Graph story

橙三吉。 提交于 2019-12-04 14:16:26

You need to create a "self-hosted object" and pass the url of your object.

function postMyAction() {
    FB.ui({
         method: 'share_open_graph',
         action_type: 'APP_NAME:action',
         action_properties: JSON.stringify({
             object: "my_url_object"
         },
    })
    }, function(response){});
}

And in object html:

<head>
    <meta property='fb:app_id' content='app_id'/>
    <meta property='og:type' content='my_app:object'/>
    <meta property='og:title' content='my_object_title'/>
    <meta property='og:image' content='an_image'/>
    <meta property='og:url' content='self_url'/>
</head>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!