Answer the question
In order to leave comments, you need to log in
How to correctly pass filter parameters when requesting the search.tagContents method in the Odnoklassniki API?
I'm trying to request content marked with a specific tag from 2017-09-25, I execute the following request:
as a result, I get data for the previous numbers:
I tried to filter the result by types, but similarly received data of all types, not those specified in the filter.
Perhaps I somehow incorrectly pass the filter parameters in the request:
return (new Client)->request(
'get',
sprintf(
'https://api.ok.ru/fb.do?%s',
http_build_query([
'anchor' => $anchor,
'application_key' => $this->options['client_public'],
'count' => 2,
'filter' => [
'since' => !is_null($date)? $date->format('Y-m-d H:i:s') : null,
],
'format' => 'json',
'method' => 'search.tagContents',
'query' => $this->filter['tag'],
'sig' => $sig,
'access_token' => $this->options['access_token'],
])
)
);
Answer the question
In order to leave comments, you need to log in
The filter should have the following format:
{"since": "2017-08-26 00:00:00", "until": "2017-09-26 00:00:00", "types": ["GROUP_TOPIC" ]}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question