samedi 21 novembre 2015

Unable to get access token from instagram

Im using this instagram wrapper package for laravel 5.1. Im trying to connect to instagram thorugh the API then auth a user in using

use Vinkla\Instagram\Facades\Instagram;
public function instagramlogin(Request $request)
{
    // Get code parameter.
    $code = $request->get('code');

    // Request the access token.
    $data = Instagram::getOAuthToken($code);

    // Set the access token with $data object.
    Instagram::setAccessToken($data);

    // We're done here - how easy was that, it just works!
    Instagram::getUserLikes();
    // This example is simple, and there are far more methods available.
}

and then be able to get access to his/her profile data. but I keep getting an error stating

ErrorException in Instagram.php line 526:
Undefined property: stdClass::$access_token

How do I auth a user?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire