Authentication with the SoundCloud JavaScript SDK in a Chrome Extension -


i'm having trouble getting data soundcloud user in chrome extension i'm building. i'm calling init function this:

sc.initialize({     client_id: '####',     redirect_uri: "chrome-extension://####/callback.html" }); 

and calling connect function this:

sc.connect(function() {     sc.get('/me', function(me) {          alert('hello, ' + me.username);      }); }); 

this opens login popup upon submit redirects callback.html tries following:

window.opener.settimeout(window.opener.sc.connectcallback, 1); 

the problem window.opener null , connectcallback never gets executed. there way make authentication flow work chrome extension?

http://developers.soundcloud.com/docs/api/guide#authentication


Comments