Reputation: 19857
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
Upvotes: 1
Views: 11000
Reputation: 11
You have to use the old php SDK until graph supports attachments... Graph only supports photoupload. Im mixing Graph and old SDK without problems..
Upvotes: 1
Reputation: 105914
Attachments aren't yet supported by the Graph API.
Arguments message, picture, link, name, caption, description, source
See my answer in your other question for a workaround.
Upvotes: 4