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);

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

有谁知道为什么?

谢谢

4

2 回答 2

4

Graph API 尚不支持附件。

根据文档

参数消息、图片、链接、名称、标题、描述、来源

请参阅我在您的其他问题中的回答以获取解决方法。

于 2010-07-28T15:30:56.130 回答
1

在图形支持附件之前,您必须使用旧的 php SDK...图形仅支持照片上传。我将 Graph 和旧 SDK 混合在一起没有问题..

于 2011-01-18T16:51:39.753 回答