它是可能有多个附件在Facebook Feed对话框呼叫

Is It Possible To Have Multiple Attachments In A Facebook Feed Dialog Call?

本文关键字:Facebook Feed 对话框 呼叫 可能有      更新时间:2023-09-26

我目前正在开发一个Magento驱动的在线商店,允许用户在Facebook上分享产品并获得他人的意见。它很好地分享了一个产品,但我也有一个比较功能,允许用户选择一些产品,然后比较它们。我希望用户能够分享他们正在考虑的所有产品,并获得他们Facebook好友的意见。

通过Facebook feed对话框发布到Facebook用户墙上时,是否有可能有多个附件,如果是这样,请有人指出我的适当位置。

这是我用来与一个附件共享产品的当前代码。

function post_to_fb()
{
    FB.ui(
    {
        method: 'stream.publish',
        attachment: {
            name: '<?php echo $_product->getName() ?>',
            description: (
                '<?php echo $_product->getShortDescription() ?>'
            ),
            source: '<?php echo Mage::helper('catalog/image')->init(Mage::registry('current_product'), 'small_image')->resize(100,100);?>',
            href: '<?php echo Mage::helper('core/url')->getCurrentUrl() ?>'
             },
             action_links: [
             { text: 'View the Product', href: '<?php echo Mage::helper('core/url')->getCurrentUrl() ?>' }
             ],
              user_prompt_message: 'Personal message here'
             },
                 function(response) {
                     if (response && response.post_id) {
                         alert('Post was published.');
                     } else {
                         alert('Post was not published.');
                     }
                 }
             ); 
          }

不久前,我在这里回答了一个类似的问题。它是关于定制发布到Facebook的动态,答案是否定的。

但是Facebook只是做了很多改变,包括在发布信息流方面的一些改变。我注意到新的"属性"参数。虽然文档不清楚,但您可以使用关于FB的文档中的"属性"来测试您的运气。ui。