Answer the question
In order to leave comments, you need to log in
What is wrong in my work with instagram api?
In general, I
use this class: https://github.com/cosenary/Instagram-PHP-API
it seems like the authorization passed and redirected me to the page I needed.
Those. this code in index.php works:
<?php
$instagram = new Instagram(array(
'apiKey' => 'key',
'apiSecret' => 'secret',
'apiCallback' => 'http://www.insta.dev/api/example/success.php'
));
// create login URL
$loginUrl = $instagram->getLoginUrl();
?>
<a class="login" href="<? echo $loginUrl ?>">» Login with Instagram</a>
$code = $_GET['code'];
if (isset($code)) {
// receive OAuth token object
$data = $instagram->getOAuthToken($code);
var_dump($data);
}
object(stdClass)#2 (3) { ["code"]=> int(400) ["error_type"]=> string(14) "OAuthException" ["error_message"]=> string(48) "Redirect URI doesn't 't match original redirect URI" }
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question