访问 Spotify 应用中的用户数据
使用这篇文章中的建议我已经能够访问 Spotify 用户数据对于他们的播放列表,
sp = getSpotifyApi(1); console.log (sp.core.library.getAlbums());
我想访问登录应用程序的用户的 Spotify 用户数据,特别是用户的 Spotify URI。
sp = getSpotifyApi(1); console.log (sp.core.user); // is undefined console.log (sp.social.relations); // is undefined
我该怎么做?
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());
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
出于隐私原因,此信息在 Spotify Apps API 中不可用。有一个唯一的用户 ID,但它不是用户的用户名。
如果您需要用户的好友列表,您需要自己连接到(例如)Facebook 并以这种方式获取。
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.
If you need the user's friends list, you'll need to connect to (say) Facebook yourself and get it that way.