如何通过API多张图片上传到一个岗位在Facebook上 [英] How to upload multiple images to one post in facebook via api
问题描述
所以。我无法使这项工作,我无法找到这个任何解决方案。
下面是我的code。
$ RESULT1 = $ facebook-> batchApi('*********** /饲料,POST,阵列(
attached_files'=> $ facebook-> attachFile($上传[2]),
));
$结果2 = $ facebook-> batchApi(********* /饲料,POST,阵列(
attached_files'=> $ facebook-> attachFile($上传[1]),
));
$解析度= $ facebook-> processBatch(阵列(
的access_token=> $ USER_PROFILE ['数据'] [0] [ACCESS_TOKEN'],
));
我使用 Facebook的批量API 。它是批量请求只是简单的包装。
需要化妆后像这样 https://www.facebook.com/centrMAN/posts/587573351326832
您的不能上传多张图片到一个单一的饲料。 (这么想的任何意义其一) P>
这是你在简单地张贴照片,不能将照片添加到饲料中提到的例子链接。
所以,相反的 /饲料
,只需使用 /照片
API来获取结果。
So. I can't make this work and i can't find any solution about this.
Here is my code.
$result1 = $facebook->batchApi('***********/feed', 'POST', array(
'attached_files' => $facebook->attachFile($uploads[2]),
));
$result2 = $facebook->batchApi('*********/feed', 'POST', array(
'attached_files' => $facebook->attachFile($uploads[1]),
));
$res = $facebook->processBatch(array(
"access_token" => $user_profile['data'][0]['access_token'],
));
I'm using facebook-batch-api. It's just simple wrapper for batch requests. Need make post like this https://www.facebook.com/centrMAN/posts/587573351326832
You cannot post multiple images to a single feed. (Dosen't make any sense either)
The example link that you've mentioned in simply posting photos, not adding photos to a feed.
So, instead of /feed
, simply use the /photos
API to get the result.
这篇关于如何通过API多张图片上传到一个岗位在Facebook上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!