I am trying to use Soundcloud api
for my application where user can create his/her own playlist of track . As a test case the example I am testing is almost exactly taken from the Soundcloud dev docs. below is my code
<script src="http://connect.soundcloud.com/sdk.js"></script>
<script>
// initialize client with app credentials
SC.initialize({
client_id: 'MY_CLIENT_ID',
redirect_uri: 'http://localhost.local/~****/sc/callback.html'
});
// initiate auth popup and create new playlist
SC.connect(function() {
SC.get('/me', function(me) {
console.log(me.username);
});
var tracks = [12573606].map(function(id) { return { id: id }; });
SC.post('/playlists', {
playlist: { title: 'My Playlist', tracks: tracks }
});
});
I already searched so many thing's in google but nothing helped me, actually i need temporary playlist so when user logout or close the browser playlist also delete . Any help would be appreciable.. thanx