我正在尝试将以下应用程序连接到FourSquare:
http://almontas.github.io/FourSquareJax/
但是我继续收到此错误消息:
{"error":"unsupported_grant_type"}
有关可能导致此错误的原因的任何想法?请参阅下面的代码:
$(document).ready(function() {
var foursquareApi = {
clientId: "4B4T220TQF43NIUKJAQI1DNASEOI12NBTTUNZ5YOETDDQORF",
clientSecret: "YDBCTHJECBNMQVFWRC1GU5RFGGPHRY4Y1VGHSVD4PLMGRKNB",
redirectUrl : "http://almontas.github.io/FourSquareJax/"
}
if (access_token == null) {
$('.dashboardProfile').hide();
$('.dashboardInfo').hide();
$('.dashboardConnect').show();
$('.connect').click(function() {
var url = "https://foursquare.com/oauth2/access_token";
url += "?client_id="+foursquareApi.clientId;
url += "&response_type=token";
url += "&redirect_uri="+foursquareApi.redirectUrl;
window.location = url;
});
}
else {
$('.dashboardProfile').show();
$('.dashboardInfo').show();
$('.dashboardConnect').hide();
}
答案 0 :(得分:0)
网址错误:
1)这就是我所拥有的:" https://foursquare.com/oauth2/access_token&#34 ;;
2)这应该是:" https://foursquare.com/oauth2/ 认证" ;