我用Google搜索但找不到合适的答案!以为它会来自我的最终还是来自Instagram?
我将返回Instagram代码存储为会话:
Instagram API类来自: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;
}
}