Using “share_open_graph” Facebook UI to create dynamic share dialog for quiz results

前端 未结 5 1318
不知归路
不知归路 2020-12-07 11:48

Summary: My problem is getting FB.ui, via the share_open_graph method, to create a customised share dialog that contain

5条回答
  •  心在旅途
    2020-12-07 12:10

    I have done with share_open_graph method with object like this,,

    FB.ui({
        method: 'share_open_graph',
        action_type: 'og.shares',
        action_properties: JSON.stringify({
            object : {
               'og:url': 'http://astahdziq.in/', // your url to share
               'og:title': 'Here my custom title',
               'og:description': 'here custom description',
               'og:image': 'http://example.com/link/to/your/image.jpg'
            }
        })
        },
        // callback
        function(response) {
        if (response && !response.error_message) {
            // then get post content
            alert('successfully posted. Status id : '+response.post_id);
        } else {
            alert('Something went error.');
        }
    });
    

提交回复
热议问题