Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://api.instagram.com/v1/users/self/media/recent?access_token={access-token}
- https://api.instagram.com/v1/users/{user-id}/media/recent?access_token={access-token}
- use MetzWebInstagramInstagram;
- $instagram = new Instagram(array(
- 'apiKey' => 'YOUR_APP_KEY',
- 'apiSecret' => 'YOUR_APP_SECRET',
- 'apiCallback' => 'YOUR_APP_CALLBACK'
- ));
- // grab OAuth callback code
- $code = $_GET['code'];
- // or maybe $code = $request->code; // if you are using Laravel
- $data = $instagram->getOAuthToken($code);
- // set user access token
- $instagram->setAccessToken($data);
- // and
- $pictures = $instagram->getUserMedia();
Add Comment
Please, Sign In to add comment