小编Sha*_*Abu的帖子

使用facebook批量请求javascript api

我试图向图api发送批处理请求,并在第二个请求的响应中收到错误:

"{
   "error": {
      "message": "(#100) Missing message or attachment",
      "type": "OAuthException",
      "code": 100
     }
}"
Run Code Online (Sandbox Code Playgroud)

谁能告诉我我做错了什么?

这是我使用的代码:

var opts = {
               message : 'Some message',
               name : 'Post Name',
               link : 'url',
               description : 'The post Description',
               picture : 'url to image'
           };

FB.api('/', 'POST', {
         batch: [
              { method: 'GET', relative_url: 'me/friends'},
              { method: "POST",relative_url: "me/feed", body : opts }
         ]
       }, function (response) {
                console.log(response);
       });
Run Code Online (Sandbox Code Playgroud)

javascript api facebook batch-file request

7
推荐指数
1
解决办法
4858
查看次数

标签 统计

api ×1

batch-file ×1

facebook ×1

javascript ×1

request ×1