Используя HTTParty, я попытался запросить токен доступа, как показано ниже:
result = HTTParty.post("https://api.instagram.com/oauth/access_token",
{
:body => [ { "client_id" => xxxxxxxxxx, "client_secret" => xxxxxxxxxxxxx,
"grant_type" => "authorization_code",
"redirect_url" => 'http://localhost:4000/access_token', "code" => xxxxxxxx } ].to_json,
:headers => { 'Content-Type' => 'application/json', 'Accept' => 'application/json'}
})
Но ответ говорит, что #400, "error_type"=>"OAuthException", "error_message"=>"Вы должны указать client_id"}, @response=#, @headers={"content-language"=> ["ru"], "expires"=>["Сб, 01 января 2000 г., 00:00:00 по Гринвичу"],........
Не могу понять почему.. Помогите!