I am struggling with a Facebook API batch request in React Native. For a single request, this tutorial works great: https://github.com/facebook/react-native-fbsdk .
But can I create a batch request. Using GraphRequestBatch does not work. Adding a request using addRequest () neither (as suggested at https://github.com/facebook/react-native-fbsdk/issues/185 ).
Please, help! I would like to send a request packet with the same node and the same edges, except for changing only the time interval.
Each request will look like this:
const request = new GraphRequest('me/',
{
accessToken: accessToken,
parameters: {
fields: {
string: 'posts.since(t1).until(t2).limit(n){likes.summary(true)}'
}
}
},
responseInfoCallback);
I tried to create several queries, each with different t1 and t2, and then add them as follows:
const graphmanager = new GraphRequestManager().addRequest(requesta);
graphmanager.addRequest(requestb);
...
graphmanager.start();
But only the first request is executed.
Thanks for the help!