未捕获异常PHP

时间:2015-02-14 17:20:28

标签: php api soundcloud

我正在尝试使用Soundcloud API从用户那里获取播放列表。
这是我的代码,但我收到此错误:http://188.166.53.62/cloudmoosic/music/soundcloud/import_playlists

这里的任何人都知道出了什么问题? 顺便说一下,我用这里的占位符替换了clientId和clientSecret。

public function import_playlists()
{
    $config = array(
        'clientId'     => 'foo',
        'clientSecret' => 'foo',
        'redirectUri'  => site_url('music/soundcloud/login')
        );
    $this->load->library('soundcloudlogin', $config);
    $this->soundcloudlogin->setCurlOptions(array(CURLOPT_FOLLOWLOCATION => 1));

    $code = $this->session->userdata('soundcloud');
    if (!$code)
        redirect(base_url());
    var_dump($code);

    $this->soundcloudlogin->setAccessToken($code);

    $playlists_sc = $this->soundcloudlogin->get('me');

    var_dump($playlists_sc);
}

0 个答案:

没有答案