Cannot use the “getSpotifyApi” function in spotify app

时间秒杀一切 提交于 2020-01-07 05:04:39

问题


No matter what we try, every time I try to call the function "getSpotifyApi" it always returns: "ReferenceError: getSpotifyApi is not defined"

I'm stumped on where to go from here because I can't do anything with spotify if it wont let me use its api...

All my javascript code is in tags in the index.html of my app.


回答1:


If getSpotifyApiis not defined it is probably because you are using the 1.X API, which uses a different approach to include the frameworks. I would recommend you to have a look at the Developer Guidelines which explains the basics on how to getting started.

There is also a sample app on GitHub that you can use to see how the different available frameworks are used.



来源:https://stackoverflow.com/questions/15960631/cannot-use-the-getspotifyapi-function-in-spotify-app

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