MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

How to develop a Myspace Application using Server Side Code

Last post 10-13-2009 7:11 AM by C. 38 replies.
Page 2 of 3 (39 items) < Previous 1 2 3 Next >
Sort Posts: Previous Next
  • 05-29-2008 6:04 PM In reply to

    Re: How to develop a Myspace Application using Server Side Code

    You need to pass it from page to page either in the query string or a hidden post variable.  You used to be able to do it with a cookie but that stopped working a few days ago.

     

     

  • 05-29-2008 6:13 PM In reply to

    Re: How to develop a Myspace Application using Server Side Code

    Yeah this is doable, our apps run totally on our servers.  The only thing that happens on myspace are the requests back to our server for the profile/home page stuff.  The canvas page simple shows the output of our pages on our server.  All the links on those pages just end up as requests back to our server.  You can see how it works by trying the iDRINK or Treasure Hunt applications.

     

  • 05-29-2008 6:18 PM In reply to

    Re: How to develop a Myspace Application using Server Side Code

    Chris:

     Russ, I greatly appreciate your example and have a little database set up like you suggested. I am trying to parse the string that comes back from the response call. This is what I have so far. Thx in adv!!

     

     

    function getProfile() {

        var req_params = new Object();

        req_params[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.SIGNED;

        req_params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;

        var req = gadgets.io.makeRequest(app_host + "/flea/asp3d.asp?filter=6221",

    signRequestCompleted, req_params);
    //document.write(req);    <- comes back "undefined". I want a string that I can parse.
    // My response URL returns "6221 Tom 5/10/2008 3"
    }
     

    The "get" URL is below:

    http://www.micrometer.com/flea/asp3d.asp?filter=6221 

     You need to have

    function signRequestCompleted(data) {

                document.getElementById('target').innerHTML = data.text;

                document.getElementById('loader').style.display = 'none';

    the data.text is the result of the request and then you are setting the innerHTML of the target div in your profile page code.  You could do whatever parsing with it at that point in the code.

    ADDED: Make sure you are not doing GZIP encoding on the server end or that will cause an undefined to show up.

     

  • 06-20-2008 5:36 AM In reply to

    Re: How to develop a Myspace Application using Server Side Code

    that was exellent Russ Cobbe . But can u make the same in the form of diagrams . So that it will make very easy .

    So please consider this things and respond me at your best.

     

     

    thanks and regards,

       sudheer.

     

  • 06-25-2008 5:43 PM In reply to

    Re: How to develop a Myspace Application using Server Side Code

    a
  • 06-25-2008 5:52 PM In reply to

    Re: How to develop a Myspace Application using Server Side Code

    a
  • 06-26-2008 4:25 AM In reply to

    Re: How to develop a Myspace Application using Server Side Code

    Russ Cobbe,

    i have done every thing what ever u said . but while i requesting the myspace server with a

    get request it is giving the following exceptions :

     

    this is my requested url to the myspace (for getting the friends details):

    Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}

    http://api.myspace.com/v1/users/390737111/friends&oauth_consumer_key=http%3A%2F%2Fwww.myspace.com%2F391638952&oauth_nonce=633500744252158559&oauth_signature=2uiZmGJ9DlXlSq5LtL0qtBxvvBw%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1214477631606&oauth_token=&oauth_version=0.1

     

    and the exception i am getting is :

    [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://10.14.1.205:8080/MyAddAds/addadshomepage.jsp?appid=111055&country=IN&installState=1&lang=en&oauth_consumer_key=http%3A%2F%2Fwww.myspace.com%2F391638952&oauth_nonce=633500757788963474&oauth_signature=mtB6vUo%2BqYbyMdqEPTU9Ydyd1%2BQ%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1214478978&oauth_version=1.0&opensocial_owner_id=390737111&opensocial_token=uAO7cldlLNrMvofT9%20qUFgz61I4aoJ3dsu0PxxKgXXLU7OxOoA5k%20Q9rWxr6rJrZe3kaLdmEc7D7e8NegtCoF366rlFA0M3MrDoVxY9rw%20E%3D&opensocial_viewer_id=390737111&ownerId=390737111&ptoString=COMMENTS%2CBLOG%2CBULLETINS%2CPROFILE%2CSEND_MESSAGE :: sendRequest :: line 53" data: no]
    if (subnav.parentNode.tagName === 'TD') {
    Canvas.a...Id=111055 (line 163)
     
     
    Access to restricted URI denied" code: "1012
    ajaxObject.open("GET",ajaxObject.responseText,"true");

     

    thanks in advance,

    sudheer.

     

     

     

     

  • 07-07-2008 2:01 AM In reply to

    • dave
    • Not Ranked
    • Joined on 02-20-2008
    • Posts 3

    Re: How to develop a Myspace Application using Server Side Code

    Could you elaborate on how to dynamically resize the external iframe? I'm having a hard time with this.
  • 07-25-2008 7:25 AM In reply to

    Re: How to develop a Myspace Application using Server Side Code

    There is something I don't get. In the request below, there is no oauth_token (well, it is empty). So the user isn't authenticated ? How can these calls work without a valid oauth access token ?

    I have tried myself to make direct REST API calls without token but I always get an HTTP 401 result. However, when using an oauth access token, things work properly.

     

    Update: I manged to the REST call withou token and now it works, I'm not sure why though. Maybe having the app state in "development" mode helps....

     

    Russ Cobbe:
     
  • 07-25-2008 7:43 AM In reply to

    Re: How to develop a Myspace Application using Server Side Code

    this was a great overview. it seems the main thing the myspace platform needs is a good example application.

     I have developed facebook applications in the past, but am focusing my efforts on myspace while facebook is going through their profile transition mess.  The main thing facebook did way better is having decent working examples.  Myspace may be aiming to set the bar higher than facebook though and provide well coded examples.

  • 07-26-2008 7:51 AM In reply to

    • Ben
    • Not Ranked
    • Joined on 02-05-2008
    • Posts 4

    Re: How to develop a Myspace Application using Server Side Code

    one thing this post didn't really explain is how you authenticate that a user is who they say they are.

     

    for example you could craft a url with fake userids and insert them into the application's database

    maybe I missed something though

  • 07-28-2008 2:48 AM In reply to

    Re: How to develop a Myspace Application using Server Side Code

     Hi,

    I have used the same code, it works fine, it is showing content from my server, but it only renders html,it does not include any javascritp code, i mean if i have written a javascritp function in my page(for example index.php which is on my server) and this function is called on any event lets say onClick event of any button, firefox shows me an error , it says: this function is not defined.

    Later I pasted these functions in developers section( canvas surface ) code, it works fine there, but why not on my page??? Please help

     

     

  • 08-07-2008 5:44 PM In reply to

    do u know how to make a myspace application cause ihave an idea for mine i have the icons and the name on it alreadybut i cant figure out how to use codes to make the aspects of the app so could u help??

  • 08-17-2008 1:36 PM In reply to

    Re: How to develop a Myspace Application using Server Side Code

    Russ I can generation a signature request with timestamp and everything but I don't know the C# syntax to make a request to the myspace server? Can you me the code to request information once you generated a Rest API string.

    thanks Anthony...........

  • 10-13-2008 8:25 AM In reply to

    Re: How to develop a Myspace Application using Server Side Code

      About dynamic resizing of iframes: Myspace resizable (height) iframe applications solution

    Source: http://www.makeperl.com/2008/10/myspace-resizable-height-iframe_10.html

Page 2 of 3 (39 items) < Previous 1 2 3 Next >