2016-05-17 5 views
0

javascript SDKで基本認証を実行しようとしています。Soundcloud Javascript SDK 3.0 - コールバックが未定義のプロパティ 'connectCallback'を読み取れません

callback.html

<!DOCTPYPE html> 
<html lang="en"> 
    <head> 
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
     <title>Connect with SoundCloud</title> 
    </head> 
    <body onload="window.setTimeout(window.opener.SC.connectCallback, 1)"> 
     <b style="text-align: center;">This popup should automatically close in a few seconds</b> 
    </body> 
</html> 

と私のスクリプトは、それを呼び出すために:

SC.initialize({ 
    client_id: /*MY CLIENT ID*/, 
    redirect_uri: 'http://www.sc-app.co.nf/callback.html' 
}); 

function connectSC() { 
SC.connect().then(function() { 
    return SC.get('/me'); 
}).then(function (me) { 
    alert('Hello, ' + me.username); 
}); 
} 

が、それは常に 「キャッチされない例外TypeErrorを示しコンソールログを確認する:プロパティを読み取ることができません。未定義の 'connectCallback'

答えて

0

頭の上に挿入

<script src="https://connect.soundcloud.com/sdk/sdk-3.0.0.js"></script> 
+0

私が見る知っている:エラー:プロパティにアクセスする権限拒否「SC」 –

関連する問題