【问题标题】:How to get the current user's country code in the Spotify Apps API?如何在 Spotify Apps API 中获取当前用户的国家代码?
【发布时间】:2012-10-09 20:37:40
【问题描述】:

我需要 JavaScript API 中当前登录的 Spotify 用户的国家/地区代码,以便按照 Spotify 指南的要求,不显示在他的国家/地区不可用的专辑。我知道用户对应用程序保持匿名。这也适用于他的国家代码吗?

【问题讨论】:

  • 回答我的问题:sp = getSpotifyApi(1);模型 = sp.require('sp://import/scripts/api/models'); models.session.country
  • 将您的答案添加为真实答案并接受它。这对我很有帮助,谢谢。

标签: spotify


【解决方案1】:

回答我的问题:

sp = getSpotifyApi(1)
models = sp.require('sp://import/scripts/api/models') 
models.session.country

【讨论】:

    猜你喜欢
    • 2020-04-11
    • 1970-01-01
    • 2015-10-04
    • 2013-10-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-07
    相关资源
    最近更新 更多