Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating FollowMe link SoundCloud
    primarykey
    data
    text
    <p>I'm trying to create a simple FollowMe link for our Company and I am having a problem with the case when a user does not allow pop-ups. Here is the code:</p> <pre><code>$(document).ready(function(){ SC.initialize({ client_id: '***********************', redirect_uri: 'http://localhost:8002/callback.html' }); var isCalled = false; var connect = function (){ isCalled = true; SC.connect(function(){ SC.put('/me/followings/123456', function(me, error){ console.log('me: ', me) console.log('error: ', error) window.location.replace("http://www.soundcloud.com"); }); }); }; $('a').click(function(){ isCalled = true; connect(); }); if(!isCalled){ console.log(isCalled); //console.log('connect called') isCalled = true; connect(); } }); </code></pre> <p>Currently if you allow pup-ups in the browser you properly follow the desired user however when the user blocks popups and clicks the link they get the following error in the dialog box.</p> <pre><code>Unsafe JavaScript attempt to access frame with URL http://localhost:8002/ from frame with URL http://soundcloud.monstercat.com/callback.html?code=79e58c1c4ee8b3fb2a1c935fb676da90&amp;state=SoundCloud_Dialog_1c798#access_token=1-24501-24540735-ab27bed0d285f42&amp;scope=non-expiring. Domains, protocols and ports must match. callback.html:6 Uncaught TypeError: Cannot read property 'connectCallback' of undefined callback.html:6 Unsafe JavaScript attempt to access frame with URL http://soundcloud.monstercat.com/callback.html?code=79e58c1c4ee8b3fb2a1c935fb676da90&amp;state=SoundCloud_Dialog_1c798#access_token=1-24201-27645735-ab27bed0d285f42&amp;scope=non-expiring from frame with URL http://soundcloud.monstercat.com/callback.html?code=79e58c1c4ee8b3fb2a1c935fb676da90&amp;state=SoundCloud_Dialog_1c798#access_token=1-24201-27645735-ab27bed0d285f42&amp;scope=non-expiring. Domains, protocols and ports must match. </code></pre> <p>Any help would be much appreciated. </p> <p>Note: callback.html is the standard one from the soundcloud dev site.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload