Answer the question
In order to leave comments, you need to log in
The Odnoklassniki API for the Wordpress site does not work, what should I do?
For some reason, the Odnoklassniki API for the Wordpress site (Wordpress Social Login plugin) does not work, all settings are made, when you click authorization through Odnoklassniki, it gives an error - Odnoklassniki reject the request. If you change the redirect link, it simply writes - the link is not set in the settings.
This is what the plugin outputs:
Request failed. Either you have cancelled the authentication or Odnoklassniki refused the connection.
Answer the question
In order to leave comments, you need to log in
Faced the same problem, I had WordPress 4.8.2 with Wordpress Social Login 2.3.3
At the moment, the Odnoklassniki handler is outdated, their API has been updated + additional is used. authorization key (in the letter it is "Application Public Key"). Here's what helped me:
function initialize()
{
parent::initialize();
// Provider apis end-points
$this->api->api_base_url = "https://api.ok.ru/fb.do";
$this->api->authorize_url = "https://connect.ok.ru/oauth/authorize";
$this->api->token_url = "https://api.ok.ru/oauth/token.do";
$this->api->sign_token_name = "access_token";
}
function getUserProfile()
{
$this->config['keys']['key'] = '<Публичный ключ приложения>';
$sig = md5('application_key=' . $this->config['keys']['key'] . 'method=users.getCurrentUser' . md5($this->api->access_token . $this->api->client_secret));
$response = $this->api->api( '?application_key=' . $this->config['keys']['key'] . '&method=users.getCurrentUser&sig=' .$sig);
...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question