Reputation: 73
Is it possible to get INSTAGRAM user details through API from localhost ?
Because I am trying to doing this from localhost but unable to fetch the information. After click the login url it redirect me to the INSTAGRAM and after successfully login and authorize the apps it redirect me properly in my callback URL with code. But when I am trying to fetch the info (cURL) using access token then it return null.
But same code run perfectly in live.
Upvotes: 4
Views: 12649
Reputation: 73
Ultimately I resolved the problem. now I am able to connect to Instagram.
I use the CodeIgniter Instagram Library by Ian Luckraft. In config file I just change the
$config['instagram_ssl_verify'] = FALSE;
By default it was TRUE
.
Upvotes: 1
Reputation: 1383
in instagram .config.php in your localhost
you must set 'apiCallback' =>
to 'http://localhost/instagram/instagram/'
folder of your success.php
<?php
// Setup class
$instagram = new Instagram(array(
'apiKey' => '',
'apiSecret' => '',
'a
?>piCallback' => 'http://localhost/instagram/instagram/' // must point to success.php
));
Upvotes: -1
Reputation: 1311
Make sure the Curl option CURLOPT_SSL_VERIFYPEER is set to false. Find the Curl request in your code and add or edit an option that will look something like this:
$ch = curl_init();
...
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); <<-- Add this line
Upvotes: 4
Reputation: 1855
Yes it is possible.
You can try using Instagram api wrapper which is made by Galen Grover
https://github.com/galen/PHP-Instagram-API
Mine's works just fine
Upvotes: -1