i Googled around but could not find the right answer! Thought it would be from my end or is it from Instagram?
I store the return instagram code as a session:
Instagram API class from: https://github.com/cosenary/Instagram-PHP-API
if ( isset($_GET['code']) ) {
$_SESSION['instagram'] = $_GET['code'];
$data = $instagram->getOAuthToken($_SESSION['instagram']);
if ( $data->code == 400 ) {
echo $data->error_message;
} else {
echo 'Your username is: ' . $data->user->username;
}
}