access users data in spotify app

夙愿已清 提交于 2020-01-06 03:29:25

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/8551114/access-users-data-in-spotify-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!