Help with API Instagram

5

Good morning everyone, I'm a beginner in WEB practices and I'm getting a lot of the Instagram API, all the examples I tested did not work, I found some posts here in the Instafeed.JS forum but I did not understand how to implement and start using, I followed the tutorial in Github but nothing, someone could give me some help at the beginning, I already registered on the Instagram developer website, I have id_client, secret and token, but I still could not.

.jsp code

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%--
    This file is an entry point for JavaServer Faces application.
--%>
<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-    8"/>
            <script type="text/javascript" src="instafeed.min.js"></script>
            <script type="text/javascript" src="app.js"></script>
            <title>JSP Page</title>
        </head>
        <body>
            <h1><h:outputText value="JSF e Jsp"/></h1>
            <button onclick="doAPI()">Fornecer Client ID e rodar</button>
            <br />
            <h3>Rock Tag</h3>
                <div id="rockTag"></div>
            <h3>Glass Tag</h3>
                <div id="glassTag"></div>
            <h3>Wood Tag</h3>
                <div id="woodTag"></div>
        </body>
    </html>
</f:view>

the project files. I think there should be a lot missing.

App.jscode

functiongetMultipleTags(tags,client){varfeeds=[];for(vari=0,len=tags.length;i<len;i++){feeds.push(newInstafeed({//restofyouroptionsget:'tagged',tagName:tags[i],target:tags[i]+"Tag",
            limit: 3,
            clientId: client,
            template: '<div class="insta-pic"><a href="{{link}}"><img src="    {{image}}" /></a></div>'
        }));
    }
    return feeds;
}
function doAPI() {
     var  client = window.prompt("Sua ID:", '');
     if( client ) {
        // get multiple tags
        var myTags = getMultipleTags(['glass', 'wood', 'rock'],client);
        // run each instance
        for(var i=0, len=myTags.length; i < len; i++) {
            myTags[i].run();
        }
    }
}
    
asked by anonymous 05.11.2016 / 18:33

0 answers