title: How to add last.fm now playing into my site using Api
body: <p>Hi guys i been trying to figure out for a long time but i suck at this, i found this code on google and i added it adn changed what i need but still doesnt work i really need this for my site: <a href="http://www.balkan-party.cf/" rel="nofollow">http://www.balkan-party.cf/</a></p>
  
  <p>I found code here: <a href="http://www.samkitson.co.uk/using-json-to-access-last-fm-recently-played-tracks/" rel="nofollow">http://www.samkitson.co.uk/using-json-to-access-last-fm-recently-played-tracks/</a></p>
  
  <p>My last.fm username i need in js: alicajdin AND
  Api key: 24f6b03517ad9984de417be5d10e150b</p>
  
  <p>This is what i did:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function() {
  $.getJSON("http://ws.audioscrobbler.com/2.0/?method=user.getRecentTracks&amp;user=alicajdin&amp;api_key=24f6b03517ad9984de417be5d10e150b&amp;limit=2&amp;format=json&amp;callback=?", function(data) {
          var html = ''; // we declare the variable that we'll be using to store our information
          var counter = 1; // we declare a counter variable to use with the if statement in order to limit the result to 1
          $.each(data.recenttracks.track, function(i, item) {
              if(counter == 1) {
                  html += 'Currently listening to: &lt;span&gt;&lt;a href="' + item.url + '" target="_blank"&gt;' + item.name + '&lt;/a&gt; - ' + item.artist['#text'] + '&lt;/span&gt;';
              } // close the if statement
              counter++ // add 1 to the counter variable each time the each loop runs
          }); // close each loop
          $('.listening-to h5').append(html); // print the information to the document - here I look for the h5 tag inside the div with a class of 'listening-to' and use the jQuery append method to insert the information we've stored in the html variable inside the h5 tag.
      }); // close JSON call
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p>I created that file and i tried to add on head section, footer section but it wont show recent tracks.
  And yea i have scroblr installed on google crome</p>