I am new to the Instagram API and am finding some issues tying to understand how to get an access token.
What i have done is registered with instagram, created an application, and used the the client id and redirect url which when I post the following into a browser gives me a code=token
response
http://www.chillwebdesigns.co.uk/feedcube/instagram/?code=462318f96370433eac29a5f845aa0829
From this how do i get an access token?
<div class="pics"></div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$.ajax({
type: "GET",
dataType: "jsonp",
cache: false,
url: "https://api.instagram.com/v1/users/[UserID]/media/recent/?access_token=[CODE]",
success: function(data) {
for (var i = 0; i < 10; i++) {
$(".pics").append("<a target='_blank' href='" + data.data[i].link + "'><img src='" + data.data[i].images.low_resolution.url +"'></img></a>");
}
}
});
});
</script>