Search code examples
javascriptinstagraminstagram-api

Instagram API - Read pictures with custom hashtag javascript


I'm learning to use Instagram API. I need to show all pictures with a specific hashtag from Javascript. How can I do that?


Solution

  • This was the solution for me:

    I generate the access token here: http://instagram.pixelunion.net/

    and then by ajax:

    $.ajax({
        type: "POST",
        method: "POST",
        url: 'https://api.instagram.com/v1/tags/<meta-tag>/media/recent?access_token=44757144.1677ed0.18f9b45ff1ea4231931d1d7ab5557833',
        dataType: "jsonp",
        success: function(result){
            if(result.meta.code == 200){
                ...
            }
        }
    });