MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

Image API

Last post 07-19-2009 11:52 PM by Alex. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 01-24-2008 1:53 PM

    Image API

    I am trying to integrate the image API into our APP and when i tested this from API Tool I get this URI

    http://api.myspace.com/users/316922592/albums.xml?api_key=C50CF2B2-B4E3-420a-9839-7966192982A1&api_sig=e/q2xFjbRtOmM0+Y7cdaj20D46s=&date=633368082682145502&token=MIIBpQYKKwYBBAGCN1gDkqCCAZUwggGRBgorBgEEAYI3WAMBoIIBgTCCAX0CAwIAAQICZgMCAgDABAjrDA0VDWBxKQQQzrlyRIkwAah4z/zxbI8k6QSCAVCrx+sY54vLumqnYAW4CP06YMpRaTLiWViHy3MVLGQfwKSnsdorArayZvDw7mGbiNhEFv8E6KaCTLZ7GAGm/qP/nzDsghm53wp7RVAVMFATBUuIKoPLE0LkRZ8brnwwamRB47e1N9hXNvbqgz1m2RWAvgui9dLWDen79SXHObhSi+1zMYRpfD4ydLM+cx/HxvoeD0aiqzMbwhqLDCudw0nBSc1fZzCCBiKt9liPzgSec5nROVlOF13N3cV3gPGWbrQds+OXqF0itEwJT1BfxL5O7Ywnj9pmLFetYQQY+rVP7QhwfMLuQn1pBwRVAQ3GiulDZdV2QLF+MgUcvVTLZMjLgWUCYx3GvOoFeuwGFcDHCVxu8tDh2mn0f7nW+hOUk1Y6hNWT7ZOLkLi6hlnHDjKgyyGUGgGUlUa3/BYerlW2LErvlQ6QFgZPjVKdKiQBbKY= 

     and its returning the XMl fine.

     

    Can you guide me how you constructed this URI and how can i do that in C#. Some code will be appreciated. If you need to email me, please do that on manik.bambha@fox.com 

    Filed under:
  • 01-25-2008 12:49 PM In reply to

    Re: Image API

    Hey, typically you probably wouldn't want to generate the above URI manually.  We abstract how it's built through the use of the MySpace container -- you can get more details by going through the Learn & Play --> OpenSocial JS Library link.  That should give you an idea of how to get back image data for a user.

    Here's a javascript snippet that'll fetch the viewer's albums: 

    var container = opensocial.Container.get(); // gets the container object

    var request = this.container.newDataRequest(); // gets a request object

    var newReq = this.request.newFetchAlbumsRequest(opensocial.DataRequest.PersonId.VIEWER, param); // creates the album request

    this.request.add(newReq, opt_key); // adds the album request to the queue

    request.send(gotAlbums); // sends the request off and passes in a callback function

     

    gotAlbums:function(response){

        if(!response.hadError())

            alert('got back an album!' + response.get("VIEWER_ALBUMS").getData().asArray()[0].getField(MyOpenSpace.Album.Field.DEFAULT_IMAGE));

    }

     

    Chad 

  • 07-19-2009 11:52 PM In reply to

    • Alex
    • Not Ranked
    • Joined on 06-03-2009
    • Posts 1

    Re: Image API

    do you have this code working as of today, i currently tested this and its not working... please help!

     ---

     got it to work as follows

      var container = opensocial.Container.get();
        var request = container.newDataRequest();
        var photoReq = MyOpenSpace.DataRequest.newFetchAlbumsRequest("VIEWER");
        request.add(photoReq, 'viewerAlbums');
        request.send(fetchPhotos);

     

     

     

Page 1 of 1 (3 items)