       SC._popupWindow = SC.Helper.openCenteredPopup uri.toString(), 456, 510
     else
       throw "Either client_id and redirect_uri (for user agent flow) must be passed as an option"
-    
+
   connectCallback: ->
     popupWindow = SC._popupWindow
     popupLocation = popupWindow.location.toString()

    if error == "redirect_uri_mismatch"
      popupWindow.document.body.innerHTML = "<p>The redirect URI '"+ popupLocation +"' you specified does not match the one that is configured in your SoundCloud app.</p> You can fix this in your <a href='http://soundcloud.com/you/apps' target='_blank'>app settings on SoundCloud</a>"
      return false
    
    popupWindow.close()
    if error
      SC._trigger("error", error)
    else
      SC.accessToken(uri.fragment.access_token);
      SC._trigger("success")
  
    SC._trigger("general", error)
  
  
  disconnect: ->
    this.accessToken(null);
  

  initialize: (options={}) ->
    this.accessToken(options["access_token"])
    this.options[key] = value for own key, value of options
    this.options.flashXHR ||= (new XMLHttpRequest()).withCredentials == undefined
    this

  hostname: (subdomain) ->
