Welcome Developers!

in

Welcome!

in

MSID.Connect.requestLogin via JSL gives error

Last post 05-23-2012 6:27 PM by Doug. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-23-2012 5:52 PM

    • Doug
    • Not Ranked
    • Joined on 05-23-2012
    • Posts 2

    MSID.Connect.requestLogin via JSL gives error

    Hello,

    I'm trying to integrate my application with MySpace using OAuth. I have been following the example posted here:

    http://wiki.developer.myspace.com/index.php?title=MySpaceID_JSL_Appendix_A:_Complete_Code_Sample

    Like in the demo, I call MSID.Connect.requestLogin, and when I do it opens a new browser window with the following url:

    http://api.myspace.com/openid?myspaceid.request_target=iframe&myspaceid.consumer_key=861a907206d841fb913ce8c099db769e&myspaceid.target_domain=http%3A%2F%2Flocalhost%2F

    But unfortunately, no matter what I do, the page always comes up with the following error:

    Oops! We're sorry, but we are unable to process your request. It looks like something is incorrect in the request we received from the site or service that brought you here. 

    I have tried the following:

    1. Removing the trailing slash from the target domain

    2. Removing the trailing slash from the External Callback Validation field on the Edit App page of the developer site (though it always comes back when I save the page)

    3. Adding the port to the target domain, since my site listens on port 7864

    4. Adding a RelayReceive.html page to my site (no effect)

    5. Replacing the consumer key and target domain with the ones from my test environment which uses a publicly accessible domain name instead of localhost (no effect)

    6. I have tried turning my app from development to production on the Edit App page, but it won't let me because it says I need to upload icons first. And when I try to upload icons, it gives me an error page. I don't think I should have to do this anyway because I want to be able to connect before my site goes live

    Below is my actual code that is calling the JSL. What else could be wrong with it?

    $(function () {

        var settings = {
            consumerKey: $('#myspace_consumerKey').val(),
            targetDomain: $('#myspace_targetDomain').val()
        };

        MSID.Connect.init(settings);

        MSID.Connect.tryConnect(function (e) {
        });

        $('#mySpace_logonButton').click(function () {
            MSID.Connect.requestLogin(function (e) {
            }, 3000);
        });

    });

  • 05-23-2012 6:27 PM In reply to

    • Doug
    • Not Ranked
    • Joined on 05-23-2012
    • Posts 2

    Re: MSID.Connect.requestLogin via JSL gives error

    I made progress with this.

    I discovered that you have to check the OpenID box and add a url to validate against. However, it wouldn't let me put in 'localhost' as apparently these domain names need to be 'unique' and some lucky *** nabbed it already. I think I can make this work by setting up an entry in my hosts file, but why is there even this 'unique' restriction anyway?

Page 1 of 1 (2 items)