javascript - FourSquare API: {"error":"unsupported_grant_type"} -


i trying connect following app foursquare:

http://almontas.github.io/foursquarejax/

however keep on getting error message:

{"error":"unsupported_grant_type"} 

any ideas can contributing error? see code below:

$(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(); } 

the url wrong:

1) have: "https://foursquare.com/oauth2/access_token";

2) should be: "https://foursquare.com/oauth2/authenticate";


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -