【问题标题】:Twitch API - Fail in the user requestTwitch API - 用户请求失败
【发布时间】:2014-01-01 20:11:51
【问题描述】:

PHP 代码中的所有内容都是正确的(我自己检查过),并且 curl 没有错误,但结果始终是一个空变量(无真/假)。

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);
}

【问题讨论】:

    标签: php curl twitch


    【解决方案1】:

    任何人和每个人都可以使用此界面作为平台从 Twitch 获取信息并将信息发布到 Twitch。所有需要的信息都在 GIT 本身上提供,并且只有 1 个限制可用,即您不能重新分发平台(出于多种安全原因)。 GIT 也是在需要时获得帮助的好方法,因为我每天都会检查它。享受开发的乐趣!

    https://github.com/IBurn36360/Twitch_Interface

    【讨论】:

      猜你喜欢
      • 2021-11-04
      • 1970-01-01
      • 2012-08-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多