Create your own Instagram app with PHP
- Register your application Instagram to get your OAuth credentials.
- Make sure to set your callback URL as a web address that is accessible anywhere from tje Internet, something like http://yourdoma.in/callback.php
- Download the latest version of the code in zip or tar.gz format.
- Unpack the code and modify the credentials stored in the $config variable of example.php to the ones obtained in step 1
- Point your browser to http://yourdomain/example.php. If the user is already authenticated, she must be presented with a recent popular photos screen. Otherwise, the authentication page will pop up.
This is the only part of the code that you should modify in example.php:
/**
* Configuration params, make sure to write exactly the ones
* instagram provide you at http://instagr.am/developer/
*/
$config = array(
'client_id' => '<your_client_id>',
'client_secret' => '<your_client_secret>',
'grant_type' => 'authorization_code',
'redirect_uri' => 'http://your.call/back/url.php',
);
If you have any question, don’t hesitate to post your comment and check back often, I read them frequently.
17 Comments
Comments RSS
TrackBack Identifier URI
Comment by lorenzo on June 8, 2011 12:37 pm
Comment by Mauricio Cuenca on June 8, 2011 11:41 pm
Comment by PaulMighty on August 8, 2011 11:59 pm
Comment by Lorenzo on October 25, 2011 12:15 pm
Comment by Lorenzo on October 25, 2011 1:55 pm
Comment by Lorenzo on October 25, 2011 3:17 pm
Comment by Mauricio Cuenca on October 26, 2011 10:54 pm
Comment by Marcus Schwarze on November 6, 2011 10:13 pm
Comment by yome on November 23, 2011 9:51 am
Comment by Caterpuchi on November 24, 2011 6:48 pm
Comment by Andrew on December 9, 2011 5:19 am
Comment by Andrew on December 9, 2011 6:05 am
Comment by Andrew on December 9, 2011 9:00 am
Comment by Andrew on December 9, 2011 9:02 am
Comment by Zsolt Takács on December 9, 2011 1:57 pm
Comment by Andrew on December 10, 2011 9:54 pm
Comment by Shane on January 9, 2012 12:17 am
Leave a comment


