How to enter api key in my javascript file



Im currently working on a school project. But I’m getting an error in my console that im not authorized, which makes sence because I have not entered any keys (which I have by the way). I just dont know where and how to enter them. This is what I got so far.

    <script src="js/jquery.js"></script>
	<script src=""></script>
	<script src=""></script>
    $(document).ready(function() {
                console.log(">> Done Loading");


Can anyone tell me where to enter the twitter keys and consumer key and secret key etc.






Hey Mark, I don’t see any Twitter-specific code in the sample you’ve pasted here. It looks like you’re loading jQuery, a Google Maps library, and then jQuere again (!), but nothing that tries to access Twitter? Am I missing something about what you are trying to achieve?


I have this piece of code too:

function buttonClick(event) { console.log("Click"); alert ("Ok");
var twitter_zoek_url= "";
        url:twitter_zoek_url ,
        success: toonTweets,
        dataType: 'jsonp',



Got this now:

$(document).ready(function() { var url = '';
          dataType: "json",
          url: url,
          success: success

function success(){
console.log(“data found”);


and getting this error: XMLHttpRequest cannot load No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘null’ is therefore not allowed access.