首页 文章

发布附件Facebook Graph API

提问于
浏览
1

现在我正试图弄清楚如何使用facebooks graph api发布附件 .

现在我正在使用

$attachment = array( 
                'message' => $_POST['tt'],
                'text' => 'Download',
                'name' => 'name', 
                'href' => 'http://www.url.com', 
                'description' => '  description!', 
                'media' => array(array(
                    'type' => 'mp3', 
                    'src' => $url, 
                    'href' => 'http://www.url.com/', 
                    'title' => $title,
                    'artist'=> 'artist',
                    'album'=>  'the album')));

        $statusUpdate = $facebook->api('/me/feed', 'post', $attachment);

问题是它只发布消息,没有别的,没有附件或任何东西 .

有谁知道为什么?

谢谢

2 回答

  • 4

    Graph API尚不支持附件 .

    the documentation

    参数消息,图片,链接,名称, Headers ,描述,来源

    请参阅your other question中的答案以获取解决方法 .

  • 1

    您必须使用旧的PHP SDK,直到图形支持附件...图表仅支持photoupload . 我没有问题混合图形和旧SDK ..

相关问题