Though we’ve supported GraphAPI Batch Requests since launch, we haven’t had any official documentation on it until now. As you would expect, batch requests on the GameStamper GraphAPI work the same way that they do on the Facebook Graph to ensure quick and painless integrations of existing Facebook Games.
How does it work?
Issue a request to http://www.gamestamper.com with a valid access_token and a batch. Batch is the JSON string of an array of logical graph requests. Each item in the batch requires a method and relative_url, while headers (corresponding to HTTP headers) and body (for POST and PUT requests) are optional.
Example:
Let’s batch two common requests, /me and /me/friends?limit=50.
curl \
-F 'access_token=...' \
-F 'batch=[ \
{"method": "GET", "relative_url": "me"}, \
{"method": "GET", "relative_url": "me/friends?limit=50"} \
]'\
https://graph.gamestamper.com
Which returns:
[
{ "code": 200,
"headers":[
{ "name": "Content-Type",
"value": "text/javascript; charset=UTF-8"
}
],
"body": "{\"id\":\"...\"}"
},
{ "code": 200,
"headers":[
{ "name":"Content-Type",
"value":"text/javascript; charset=UTF-8"
}
],
"body":"{\"data\": [{...}]}
}
]