I have made a simple link which checks in a predefined venue in foursquare. I am using the foursquare api: https://api.foursquare.com/v2/checkins/add. I passed the required parameters but the problem is that after check in, the response of the http post request is displayed to the user. I want the user to be redirected to m.foursquare.com
I have implemented it in a mobile website.
<form id="frm1" action="https://api.foursquare.com/v2/checkins/add" method="post">
<input type="hidden" name="venueId" value="50add32f29a67a495fca09c1"><br>
<input type="hidden" name="shout" value="I am watching Black Cat at Chinese Multiplex"><br>
<input type="hidden" id="token" name="oauth_token"><br>
<input type="hidden" name="v" value="20121122"><br>
Then I am setting the access token value as:
document.getElementById("token").value=at;
Then I submit the form
document.getElementById("frm1").submit();
I am extracting the access token from url by some code...and it is getting passed in the request and even the checkin is successful but the response is displayed which is not desired.As the response looks like a javascript object containing elements like meta, notifications etc.So please suggest a method to bypass the response and go to the foursquare homepage.