Richard Hughes
Richard Hughes

Reputation: 132

Spotify Playlist ios sdk swift issues

For some reason whenever I run the function get Spotify playlists, it returns that I have no playlists even though I have two. I was wondering what the issue was. Thanks, Richard

        SPTPlaylistList.playlists(forUser: auth?.clientID,     withAccessToken: auth!.session.accessToken , callback: {
        (error, results)->Void in
        if (error != nil) {
            print(error!)
        } else {
            let hisplaylists = results as! SPTListPage
            print(hisplaylists)
        }
    })
}

Upvotes: 1

Views: 262

Answers (1)

Mitch Kelly
Mitch Kelly

Reputation: 491

You need to use auth?.session.canonicalUsername instead of auth?.clientID

Upvotes: 1

Related Questions