1

我无法正确获取代码以使(我的应用程序的)用户发布到朋友的墙上。我希望用户能够选择单身朋友并发布到他们的流中。让用户从列表中选择 1 个朋友或输入朋友姓名,我缺少什么?这是我无法工作的“发布”功能。当方法是“供稿”以发布到用户的墙上时,它可以工作。但是作为“stream.publish”的方法,它的功能仍然类似于“feed”并发布到用户的墙上。

     function pubStream(obj,gift_id,item_name)
     {
     FB.ui({
            method: 'stream.publish',
            display: 'popup',     //have tried display:iframe does same             
            name: "Special Delivery!",
            link: "<?php echo $app_info['transfer_protocol']; ?>apps.facebook.com/<?php echo $app_info['canvas']; ?>/?friendID="+facebook_id+"&giftID="+gift_id,
            picture: "<?php echo $app_info['upload_url']; ?>"+obj,
            caption: "//not used at this time ",
            description: "my item escription",
            message: "user's message ",
            actions: {"name":"my items name","link":"<?php echo $app_info['transfer_protocol']; ?>apps.facebook.com/<?php echo $app_info['canvas']; ?>/?friendID="+facebook_id+"&giftID="+gift_id}
    },function(response){hideLightbox();});
  }
4

1 回答 1

2

看起来您正在寻找“发送”用户界面。

这里有相关文档: https ://developers.facebook.com/docs/reference/dialogs/send/

它实际上与您的提要对话框的代码相同,除了用户可以指定他们想与哪些朋友交流。

假设您的代码是正确的,这将起作用:

function pubStream(obj,gift_id,item_name)
     {
     FB.ui({
            method: 'send',
            display: 'popup',     //have tried display:iframe does same             
            name: "Special Delivery!",
            link: "<?php echo $app_info['transfer_protocol']; ?>apps.facebook.com/<?php echo $app_info['canvas']; ?>/?friendID="+facebook_id+"&giftID="+gift_id,
            picture: "<?php echo $app_info['upload_url']; ?>"+obj,
            caption: "//not used at this time ",
            description: "my item escription",
            message: "user's message ",
            actions: {"name":"my items name","link":"<?php echo $app_info['transfer_protocol']; ?>apps.facebook.com/<?php echo $app_info['canvas']; ?>/?friendID="+facebook_id+"&giftID="+gift_id}
    },function(response){hideLightbox();});
  }

您只需选择method: 'send'然后使用“提要”文档中显示的属性,此处:http: //developers.facebook.com/docs/reference/dialogs/feed/

于 2011-10-20T18:22:26.343 回答