在Spotify应用接入用户数据 [英] access users data in spotify app

查看:135
本文介绍了在Spotify应用接入用户数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用在这篇文章的建议我已经能够访问他们与Spotify的播放列表用户的数据

Using the advice in this post I have been able to access the spotify users data for their playlists with


sp = getSpotifyApi(1);
console.log (sp.core.library.getAlbums());                

我要访问Spotify的用户数据,为用户登录到应用程序,专门为用户Spotify的URI。

I want to access the spotify user data for the user logged into the app, specifically the spotify uri for the user.


sp = getSpotifyApi(1);
console.log (sp.core.user);        // is undefined
console.log (sp.social.relations); // is undefined

我怎样才能做到这一点?

How can I do this?

推荐答案

本信息不是Spotify的应用程序API隐私原因中找到。有一个唯一的用户ID,但不是该用户的用户名。

This information is not available in the Spotify Apps API for privacy reasons. There is a unique user ID, but it is not the user's username.

如果您需要的用户的好友列表中,你需要连接到(比方说)Facebook的自己,并得到它的方式。

If you need the user's friends list, you'll need to connect to (say) Facebook yourself and get it that way.

这篇关于在Spotify应用接入用户数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆