Reputation: 22171
Hitting the Facebook graph api with a batched request:
curl -F 'access_token=mytoken' -F 'batch=[{ "method":"GET","relative_url":"me?fields=name,first_name,last_name,picture.width(100).height(100),email", "include_headers":"false"},
{ "method":"GET","relative_url":"me?fields=picture.type(large)", "include_headers":"false"}]' https://graph.facebook.com/v2.2
The result still contain the headers.
I don't expect them in the result.
Is the "include_headers":"false"
syntax wrong or misplaced?
Thanks a lot.
Upvotes: 2
Views: 820
Reputation: 898
If you're using the python facebook-sdk this does the trick:
rezs = self.graph.request("?include_headers=false",
post_args={"batch": batched_requests})
where my self.graph
is:
self.graph = facebook.GraphAPI(access_token=access_token,
version="2.5")
and the batched_requests
is a string containing the IDs and fields that I want.
Upvotes: 0
Reputation: 8467
I was able to exclude the headers in batch requests a few different ways. I'm doing it from the PHP SDK but it's all the same under the covers.
-F "include_headers=false"
to your curl command"&include_headers=false"
to relative_urlHope that helps!
Upvotes: 3