Facebook 图API批处理请求与依赖项和增量?

Facebook 图API批处理请求与依赖项和增量?,facebook,facebook-graph-api,facebook-batch-request,Facebook,Facebook Graph Api,Facebook Batch Request,我希望执行批处理请求并使用依赖项,但我需要增加收到的ID。正如你在下面看到的,我尝试了一些不同的想法,但都不管用。有人用过这个吗 var q = {batch:[{"name":"get-friends", "method":"GET","relative_url":"me/friends","omit_response_on_success": false}, {"method":"GET","relative_url":"/?ids={result=get-f

我希望执行批处理请求并使用依赖项,但我需要增加收到的ID。正如你在下面看到的,我尝试了一些不同的想法,但都不管用。有人用过这个吗

var q = {batch:[{"name":"get-friends", "method":"GET","relative_url":"me/friends","omit_response_on_success": false},
                {"method":"GET","relative_url":"/?ids={result=get-friends:$.data[*].id}"},
                {"method":"GET","relative_url":"{result=get-friends:$.data[*].id}/mmxstaging:watch"},
                {"method":"GET","relative_url":"/mmxstaging:share?ids={result=get-friends:$.data[*].id}"}]};

FB.api('/', 'post', q, function(response) {
    console.log(response);
});

你找到解决办法了吗?如果不是,我的解决方案如下:

var q = {batch:[{"name":"get-friends", "method":"GET","relative_url":"me/friends","omit_response_on_success": false},
            {"method":"GET","relative_url":"/?ids={result=get-friends:$.data.*.id}"},
            {"method":"GET","relative_url":"{result=get-friends:$.data.*.id}/mmxstaging:watch"},
            {"method":"GET","relative_url":"/mmxstaging:share?ids={result=get-friends:$.data.*.id}"}]};

FB.api('/', 'post', q, function(response) {
    console.log(response);
});
我已经用其他代码测试过了,它可以工作,它会得到朋友,然后自动检查每个朋友id,并为我完成任务

如果你需要其他帮助,请告诉我


抱歉打断了这个老问题。

你找到解决办法了吗?如果不是,我的解决方案如下:

var q = {batch:[{"name":"get-friends", "method":"GET","relative_url":"me/friends","omit_response_on_success": false},
            {"method":"GET","relative_url":"/?ids={result=get-friends:$.data.*.id}"},
            {"method":"GET","relative_url":"{result=get-friends:$.data.*.id}/mmxstaging:watch"},
            {"method":"GET","relative_url":"/mmxstaging:share?ids={result=get-friends:$.data.*.id}"}]};

FB.api('/', 'post', q, function(response) {
    console.log(response);
});
我已经用其他代码测试过了,它可以工作,它会得到朋友,然后自动检查每个朋友id,并为我完成任务

如果你需要其他帮助,请告诉我

抱歉打断了这个老问题