dshdsh2016 2014-01-01 20:11
浏览 44
已采纳

Twitch API - 用户请求失败

Everything in the PHP code is correct (I checked myself) and there is no error from curl, but the result is always an empty variable (No true/false).

public function prepareUser() {
$url = $this->TwitchAPI->endUrl("USERT");
$temp = curl_init();
curl_setopt($temp, CURLOPT_URL, $url);
curl_setopt($temp, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($temp, CURLOPT_HEADER, array("Authorization" => "OAuth " . $this->access_token));
curl_setopt($temp, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($temp, CURLOPT_SSL_VERIFYPEER, false);
$ret = curl_exec($temp);
if (curl_errno($temp)) {
die("Error - " . curl_error($temp));
}
curl_close($temp);

$this->user = json_decode($ret);
}
  • 写回答

1条回答 默认 最新

  • dtlh12053 2014-01-02 13:59
    关注

    Anyone and everyone can use this interface as a platform to grab information from Twitch and post information to Twitch. All needed information is provided on the GIT itself, and is available with only 1 restriction, that you not redistribute the platform (For several security reasons). The GIT is also a good way to get help when needed, as I check it daily. Enjoy and have fun deving!

    https://github.com/IBurn36360/Twitch_Interface

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 phython如何实现以下功能?查找同一用户名的消费金额合并—
  • ¥15 孟德尔随机化怎样画共定位分析图
  • ¥18 模拟电路问题解答有偿速度
  • ¥15 CST仿真别人的模型结果仿真结果S参数完全不对
  • ¥15 误删注册表文件致win10无法开启
  • ¥15 请问在阿里云服务器中怎么利用数据库制作网站
  • ¥60 ESP32怎么烧录自启动程序
  • ¥50 html2canvas超出滚动条不显示
  • ¥15 java业务性能问题求解(sql,业务设计相关)
  • ¥15 52810 尾椎c三个a 写蓝牙地址