MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

extract my information profiles return undefined [such as email,children]

Last post 06-19-2009 1:12 PM by Jorge. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 06-05-2009 3:36 PM

    extract my information profiles return undefined [such as email,children]

    Hello all ,

    When I tried to retreive my persoanl information , some of them return undefined such as[ children - smoker -religion -looking_for _ date_of_birth]. as you can see in the code below. I hope to help me to solve this problem as soon as possible

     div id='heading'></div>
    <hr size="1px" />
    <script type="text/javascript">
    var c = document.getElementById("heading");
    function doMakeRequest()
    {
        var param = {};
        param[opensocial.ContentRequestParameters.AUTHENTICATION] = opensocial.ContentRequestParameters.AuthenticationType.NONE;
        param[opensocial.ContentRequestParameters.METHOD] = opensocial.ContentRequestParameters.MethodType.GET;
        param[opensocial.ContentRequestParameters.CONTENT_TYPE] = opensocial.ContentRequestParameters.ContentType.HTML;
        opensocial.makeRequest("http://www.openspaceeditor.com/makeRequest.htm", gotMakeRequest, param);
    }
    function gotMakeRequest(response, url, errored)
    {
        if(!errored)
        {
            c.appendChild(document.createTextNode(response + "\r\n"));
        }
        else
        {
            c.appendChild(document.createTextNode("makeRequest failed:(" + response + ")(" + url + ")(" + errored + ")" + "\r\n"));
        }
    }
    doMakeRequest();
    </script>
     
     
     
    Example: newFetchPersonRequest
     
    <div id='heading'></div>
    <hr size="1px" />
    <script type="text/javascript">
    var os;
    var dataRequest;
    function dataRequest()
    {
        os = opensocial.Container.get();
        dataRequest = os.newDataRequest();
        var param =
        {
        }
        ;
        param[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] = [opensocial.Person.Field.ID,MyOpenSpace.Person.Field.ABOUT,MyOpenSpace.Person.Field.BOOKS];
        var OWNERReq = os.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER, param);
        dataRequest.add(OWNERReq);
        dataRequest.send(getResponse);
    }
    function getResponse(response)
    {
        if( response.hadError() )
        {
            document.write("There is an error in the response. <br>");
            return;
        }
        var OWNER = response.get(opensocial.DataRequest.PersonId.OWNER).getData();
        var birth = OWNER.getField(MyOpenSpace.Person.Field.DATE_OF_BIRTH);
     var looking = OWNER.getField(MyOpenSpace.Person.Field.LOOKING_FOR);
     var religion = OWNER.getField(MyOpenSpace.Person.Field.RELIGION);
     var chid = OWNER.getField(MyOpenSpace.Person.Field.CHILDREN);
     var emails = OWNER.getField(MyOpenSpace.Person.Field.EMAILS);
     var smoking = OWNER.getField(MyOpenSpace.Person.Field.SMOKER);
     var eth = OWNER.getField(MyOpenSpace.Person.Field.ETHNICITY);

       
        document.write(birth+ "<br>");
     document.write(looking+ "<br>");
     document.write(religion+ "<br>");
     document.write(chid+ "<br>");
     document.write(emails+ "<br>");
     document.write(smoking+ "<br>");
     document.write(eth+ "<br>");
     
        document.write("<br>");
        document.write("<br>");
    }
    dataRequest();
    </script>

  • 06-06-2009 1:32 AM In reply to

    Re: extract my information profiles return undefined [such as email,children]

    Have you seen this sample app for the .8 editor? Let me know if this helps. :)

    http://profile.myspace.com/Modules/Applications/Pages/Canvas.aspx?appId=124902

    (I just ran a quick test using it and was able to get religion) :)

  • 06-06-2009 8:46 AM In reply to

    Re: extract my information profiles return undefined [such as email,children]

     I tested the code on own my programm , give me same problem[ undefined ]. I hope to test on my code above

     

    Thanks

  • 06-06-2009 2:11 PM In reply to

    Re: extract my information profiles return undefined [such as email,children]

    let me know if you're able to work with the .8 editor. Thanks

  • 06-07-2009 5:07 AM In reply to

    Re: extract my information profiles return undefined [such as email,children]

     I am working with 0.7 version

     

  • 06-07-2009 6:44 AM In reply to

    Re: extract my information profiles return undefined [such as email,children]

     We have a .7 editor too :)

    http://profile.myspace.com/Modules/Applications/Pages/Canvas.aspx?appId=102563

  • 06-07-2009 8:23 AM In reply to

    Re: extract my information profiles return undefined [such as email,children]

     Thanks for replying quickly ...

    I would like to solve the problem from my code , all fields such as[name, id  ,interests, movies] return string, but  above fields return undefined , so I hope to help me to solve this problem as soon as possible.

     

  • 06-07-2009 8:43 AM In reply to

    Re: extract my information profiles return undefined [such as email,children]

    The editors are there as a guide and can help you with syntax. You don't have to use the code from it, but it may help you determine what the problem is. 

    I cannot troubleshoot your code for you, sorry. I can possibly get someone to take a look, but given the fact that our team is pretty slammed with priorities right now, I don't think it wil happen any time soon.

    Rhonda

     

  • 06-07-2009 8:55 AM In reply to

    Re: extract my information profiles return undefined [such as email,children]

     Ah, ok.. started messing with the editor, and I see you cannot get certain fields, and now I wonder if they're available in .7

    I know they're available in .8

    Let me look into this more.

    Rhonda

     

  • 06-07-2009 8:58 AM In reply to

    Re: extract my information profiles return undefined [such as email,children]

     Looking at the documentation now: 

    http://developer.myspace.com/community/myspace/myopenspaceCoreV07.aspx 

    And I do not see those fields available in the documentation

    I know we're no longer enhancing .7 so if these are not available,you'd have to move to .8 to get it. 

    I'll find ot.

  • 06-19-2009 1:12 PM In reply to

    Re: extract my information profiles return undefined [such as email,children]

     On .7 this are the files we support in adition of the basic information (profile url, thumbnail, id, nickname)

    BOOKS
    DESIRE_TO_MEET
    HEADLINE
    HEROES
    INTERESTS
    MOVIES
    MUSIC
    OCCUPATION
    TV_SHOWS
    ZODIAC_SIGN
    STATUS
    MOOD

    ABOUT_ME
    AGE
    CITY
    COUNTRY
    GENDER
    HOMETOWN
    RELATIONSHIP_STATUS
    POSTALCODE
    REGION

     Some of these fields require that the user grant extra permission to be able to get them
    ACCESS_TO_IDENTITY_INFORMTION
    FULL_PROFILE_INFO

    If the user hasn't grant this pemissions the data will not be returned and it will be undefined.

     Jorge

Page 1 of 1 (11 items)