Facebook feed dialog: allow user to select destination page or group

前端 未结 2 1407
我在风中等你
我在风中等你 2021-01-14 18:46

I\'m using a Facebook feed dialog through JavaScript:

var p = {
method: \'feed\',
    name: \'Title\',
    caption: \'Subtitle - 26/02/2013\',
    descriptio         


        
相关标签:
2条回答
  • 2021-01-14 19:04

    There is an option in the feed dialog box for selecting the destination.Please check http://developers.facebook.com/docs/reference/dialogs/feed/

    0 讨论(0)
  • 2021-01-14 19:12

    The built-in share dialog included in the JavaScript SDK doesn't include this functionality. You will instead need to create your own dropdown with the options you want and then have the share button underneath. You will then need to find the value of this dropdown and add it to the to parameter of the FB.ui function:

    <select id="to_user">
     <option value="{user_id}">My wall</option>
     <option value="{page_id}">My page</option>
     <option value="{group_id}">My group</option>
    </select>
    
    <script>
    var p = {
        method: 'feed',
        to: $('#to_user').val(),
        name: 'Title',
        caption: 'Subtitle - 26/02/2013',
        description: 'My text',
        link: window.location.href
    };
    FB.ui(p);
    </script>
    
    0 讨论(0)
提交回复
热议问题