php - Can you batch search queries like graph.facebook.com/search?q=QUERY&type=OBJECT_TYPE? -
There are no instances of using a search query for the relative url for the requests of the batch API. It should work like other API calls, but I'm getting an error and I wonder if Facebook gives you batch search queries. So I am batching some API calls like php using sdk
$ queries = array (array ('method' = & gt; 'gET', 'relative_url' = & gt; '/ 67226614422'), array ('method' = & gt; 'GET', 'relative_url' => '/ 140959058191');); $ This- & gt; Test (json_encode ($ questions)); $ Objs = $ fb- & gt; API ('/? Batch =' .json_encode ($ queries), 'post'); That works great but if I try to use the search = q = QUERY and type = page as the relative URL like below
$ queries = array (array ('method' = & gt; 'post', 'relative_url' = & gt; '/ search? Q = connell & type = page'), array ('method' = ' & Gt; GET ',' relative_url = '>' / 67226614422 '), array (' method '= & gt;' GET ',' relative_url '=>' / 140959058191 ');); SDK throws an error
Unkit exception: batch parameter should be thrown in a JSON array ... / facebook.php [{"method": "post", "relative_arl": "\ / search? Q = connail and type = page"}, { "Method": "GET", "relative_url": "\ / 67226614422"}, {"method": "GET", "relative_url": "\ / 140959058191"}]
You must convert relative_url to a URL in sign language if it has an ampersand.
The same goes if you are requesting a post, and with the body you are sending, you have more than one parameter.
Comments
Post a Comment