Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 15th, 2012  |  syntax: JavaScript  |  size: 0.69 KB  |  hits: 27  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.                                         <script>
  2.                                         $(document).ready(function() {
  3.                                         /* Instantiate the global sp object; include models & views */
  4.                                         var sp = getSpotifyApi(1);
  5.                                         var models = sp.require("sp://import/scripts/api/models");
  6.  
  7.                                         /* The <div /> that will contain the popup */
  8.                                         var element = $('#share');
  9.  
  10.                                         /* The Spotify URI of the content you want to share */
  11.                                         var content = 'spotify:track:2ijsITOdUkUeF8EW7OfYBr';
  12.  
  13.                                         /* Display the popup */
  14.                                         models.application.showSharePopup(element[0], content);
  15.                                         });
  16.                                         </script>