Answer the question
In order to leave comments, you need to log in
Why does mediatopic.post method return error 100?
Hello, I have the following problem. I'm trying to publish a post to a group using the mediatopic.post method, but it returns the following error:
array(3) { ["error_code"]=> int(100) ["error_msg"]=> string(56) "PARAM : Only one of session_key or uid must be specified" ["error_data"]=> NULL }
public function ok()
{
if (!OdnoklassnikiSDK::checkCurlSupport()) {
print "У вас не установлен модуль curl, который требуется для работы с SDK одноклассников. Инструкция по установке есть, например, <a href=\"http://www.php.net/manual/en/curl.installation.php\">здесь</a>.";
return;
}
if (!is_null(OdnoklassnikiSDK::getCode())) {
if (OdnoklassnikiSDK::changeCodeToToken(OdnoklassnikiSDK::getCode())) {
$params = array(
'uid' => '572863283691',
'type' => 'GROUP_THEME',
'gid' => '54201097322731',
'attachment' => '{"media": [{"type": "text","text": "hello"}]}',
'format' => 'json'
);
$testPost = OdnoklassnikiSDK::makeRequest("mediatopic.post", $params);
var_dump($testPost);
}
}
}
Answer the question
In order to leave comments, you need to log in
The problem is solved as follows: removed the line 'uid' => '572863283691',
from the parameter array.
Not sure, but perhaps the answer is already here:
https://toster.ru/search?q=Only+one+of+session_key...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question