Instagram API:服务器没有';无法接收数据
我使用此代码从Instagram API获取数据。该代码在某些服务器上正确运行,但在其他服务器上它不会从Instagram API接收数据。所有服务器都启用了“Curl”,谁知道发生了什么Instagram API:服务器没有';无法接收数据,instagram,Instagram,我使用此代码从Instagram API获取数据。该代码在某些服务器上正确运行,但在其他服务器上它不会从Instagram API接收数据。所有服务器都启用了“Curl”,谁知道发生了什么 <?php require 'instagram.class.php'; require 'config.php'; // Receive OAuth code parameter $code = $_GET['code']; // Check whether the user has grante
<?php
require 'instagram.class.php';
require 'config.php';
// Receive OAuth code parameter
$code = $_GET['code'];
// Check whether the user has granted access
if (true === isset($code)) {
// Receive OAuth token object
// Take a look at the API response
$data = $instagram->getOAuthToken($code);
if(empty($data->user->username)){
header('Location: index.php');
} else {
session_start();
$_SESSION['xxx']=$data;
$user=$data->user->username;
$ig_id=$data->user->id;
header('Location: profile.php');
}
} else {
// Check whether an error occurred
if (true === isset($_GET['error'])){
echo $_GET['error_description'];
}
}
?>
您找到问题的解决方案了吗?我有同样的问题不知道是什么问题!是的,问题出在服务器上。。。