发布附件Facebook Graph API [英] Posting Attachment Facebook Graph API

查看:103
本文介绍了发布附件Facebook Graph API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



现在我正在使用

  $ attachment = array(
'message'=> $ _POST ['tt'],
'text'=> '下载',
'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'=>'专辑')));

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

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



有没有人知道为什么?



谢谢

解决方案

Graph API尚不支持附件。



Per 文档


参数 ,图片,链接,
名称,标题,描述,来源


请参阅我的答案您的其他问题解决方法。


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

解决方案

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.

这篇关于发布附件Facebook Graph API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆