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 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私