【问题标题】:How to post on friends wall on facebook?如何在facebook上的朋友墙上发帖?
【发布时间】:2012-08-30 06:49:55
【问题描述】:

我正在使用 facebook php sdk。我已经在我的应用程序上集成了 facebook 开放图。 我想使用这张图片中的开放图在朋友墙上发帖。 我已经从另一个应用程序中捕获了这个图像墙帖子,我想制作这样的相同帖子。

我还想创建一个操作链接,例如“获取应用程序”。 当用户点击获取应用程序时。我的应用应该在新标签页上打开。

我阅读了很多文档。他们说不可能使用开放图在朋友墙上发帖,我尝试了 $facebook->api('/$firend_id/feed) 但它在朋友墙上发布了一个链接。 我不想要链接我想在朋友墙上发布礼物。

请建议我该怎么做?

问候, 克里希纳

【问题讨论】:

  • 您不能向除您的应用用户之外的任何其他人发布 Open Graph 操作。但这在我看来并不像 Open Graph 操作,而是像张贴在别人墙上的普通链接一样。链接本身可能有参数,以便应用在点击链接时知道谁给了谁。

标签: facebook-graph-api facebook-php-sdk facebook-opengraph


【解决方案1】:

根据附件,我认为您的意思是“如何将操作链接添加到墙帖?”见https://developers.facebook.com/docs/opengraph/actionlinks/

【讨论】:

【解决方案2】:

我用hit and trial方法解决了。

$attachment = array(
             'message' => $d['giftmsg'],
            'name' => 'You have recived a gift voucher for a '.$dd['title'].'!' .'',
            'link'=>'https://thevoucherlink.com/redirect.php',
            'description' => " Please click on the link to claim your gift card. Do it soon! This promotional card is valid for a limited time.. <center>&nbsp;</center> The Voucher Link allows facebook users send gift vouchers from local businesses to their friends",
            'picture' => $im,
            'actions'=>array('name'=>'Get Voucher','link'=>'https://thevoucherlink.com/redirect.php')
        );  


        try {
             $t=    $facebook->api('/' . $_POST['friend_id']. '/feed', 'POST', $attachment);
        } catch (Exception $exc) {
            $err= $exc->getTraceAsString();
        }

您可以在帖子上使用这些参数发布相同的帖子。

感谢您的回答..

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-25
    相关资源
    最近更新 更多