views:

281

answers:

1

Hi,

Right now I'm trying to figure out how to post an attachment using facebooks graph api.

Right now I'm using

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

Problem is it's only posting the message, nothing else, no attachment or anything.

Does anyone have any idea why?

Thanks

+1  A: 

Attachments aren't yet supported by the Graph API.

Per the documentation

Arguments message, picture, link, name, caption, description, source

See my answer in your other question for a workaround.

Peter Bailey

related questions