app/Http/Controllers/HomeController.php
// Get access token on callback, once user has authorized via above method
Get access token on callback, once user has authorized via above method
Get access token on callback once user has authorized via above method
public function callback(Request $request, Instagram $instagram)
    {
    	$response = $instagram->getAccessToken($request->code);
        if (isset($response['code']) == 400)
        {
            throw new \Exception($response['error_message'], 400);
        }
        return $response['access_token'];
    }
public function callback ( Request $ request , Instagram $ instagram ) { $ response = $ instagram -> getAccessToken ( $ request -> code ) ; if ( isset ( $ response [ 'code' ] ) == 400 ) { throw new \ Exception ( $ response [ 'error_message' ] , 400 ) ; } return $ response [ 'access_token' ] ; }
Get access token on callback, once user has authorized via above method
Get access token on callback once user has authorized via above method
// or $response = Instagram::getAccessToken($request->code);