MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

PHP Client Library

Last post 11-05-2009 2:18 AM by sandy. 133 replies.
Page 4 of 9 (134 items) « First ... < Previous 2 3 4 5 6 Next > ... Last »
Sort Posts: Previous Next
  • 02-29-2008 12:27 PM In reply to

    Re: PHP Client Library

     Wait.. your makeRequest call is actually sending OAuth values?

    I get oauth_nonce, and oauth_consumer_key ..

     

    but my oauth_token and oauth_signature are always empty 

  • 03-03-2008 5:32 PM In reply to

    Re: PHP Client Library

     Jerome,

    Thanks a lot for the lib. Do you have any plans to keep this code on a shared platform for contribution and update regularly?

    For the ones who are getting the exception, try changing  line 184 (_do_request function throw Exception line)

    FROM: throw new Exception($code.' '.$hResult['BODY']['DIV']['P']);   

    TO: throw new Exception($code.' '.$hResult["message"].$hResult['BODY']['DIV']['P']);  

     

    This way you can see what's returned.  In my case it was all "user not installed application" errors, which makes sense.

    My question: How are we supposed to know if a particular user installed our app. or not?

    friendship method didn't work with app id as user id.  

    any ideas? 

     

  • 03-04-2008 3:22 PM In reply to

    Re: PHP Client Library

    "simplexml_load_string" function fails when the root element has the same namespace extension with its reference.

     http://bugs.php.net/bug.php?id=37035

    for example <ns:root xmlns:ns="http://www.ns.com"> 



     

  • 03-06-2008 9:32 AM In reply to

    • Kostya
    • Not Ranked
    • Joined on 02-26-2008
    • Posts 3

    Re: PHP Client Library

    Hi,

    thank you Jarome for the library. 

    I submitted this code to the Assembla SVN:  http://www.assembla.com/wiki/show/myspace_php_lib

    You can download the code using svn from http://svn2.assembla.com/svn/myspace_php_lib

    To make commit of the changes you should to register on the www.assembla.com and join the team http://www.assembla.com/wiki/show/myspace_php_lib

    It is public, any one can join the team and use it.

    Let me know if you have any question.

    Best regards. 

    Filed under: ,
  • 03-06-2008 9:17 PM In reply to

    Re: PHP Client Library

    It's weird...  The user has this app installed yet when I go to try it out on a user who has it installed I get this:

     

    Fatal error: Uncaught exception 'Exception' with message '401 ' in /home/track/public_html/picscrape/client/myspace.php:186 Stack trace: #0 /home/track/public_html/picscrape/client/myspace.php(143): myspace->_do_request('users/4747874/p...', Array) #1 /home/track/public_html/picscrape/client/myspace.php(60): myspace->do_request('users/4747874/p...') #2 /home/track/public_html/picscrape/includes/myspace.inc.php(6): myspace->profile(4747874) #3 /home/track/public_html/picscrape/index.php(9): require('/home/track/pub...') #4 {main} thrown in /home/track/public_html/picscrape/client/myspace.php on line 186

     

    How exactly do you need to format the Application URL as the key?

  • 03-07-2008 7:02 AM In reply to

    • Kostya
    • Not Ranked
    • Joined on 02-26-2008
    • Posts 3

    Re: PHP Client Library

    I have the same issue.

    It looks like some error of the MySpace API 

  • 03-07-2008 10:22 AM In reply to

    Re: PHP Client Library

     $appid = "xxxxxxxx";
     $key = "http://www.myspace.com/$appid";

    I just tried and it works for me.

     

  • 03-07-2008 10:40 AM In reply to

    Re: PHP Client Library

    When we go for editing MySpace provides us Application URI  like,

      http://www.myspace.com/xxxxxxxx

    we have to use this as key.

     

    It is working for me..... 

      
     

  • 03-10-2008 5:48 PM In reply to

    Re: PHP Client Library

    I am receiving Invalid digital signature.  Has anyone experienced this and knows how to fix it?

    I have used http://222.222.222:2222 which is my server that my iframe is loading, and I am using this (not url encoded) as my Consumer Key.  I am also using my Security Key as my Consumer Secret.

    What am I doing wrong?

    PHP Fatal error:  Uncaught exception 'Exception' with message '401 Invalid digital signature.-asdf1234asdf1234asdf1234= did not match server signature :asd1234asfd1234asdf1234asdf1234=' in

    Space.php:184\nStack trace:\n#0

    Space.php(143): Space->_do_request('users/329777102...', Array)\n#1

    Space.php(60): Space->do_request('users/329777102...') 

  • 03-10-2008 6:42 PM In reply to

    Re: PHP Client Library

    I suspect it's the fact that you state a port -- this isn't allowed in makeRequests (the number one source of OAuth authentication), and must use port :80, which, under OAuth standards must be excluded from the basestring, so I think MySpace is cutting off your port call when it's building up the basestring, so you'll have to do the same on your end.

  • 03-11-2008 12:42 AM In reply to

    Re: PHP Client Library

    I'm getting this error "Fatal error: Uncaught exception 'Exception' with message '401 Authentication failed..." 

    I'm confused where to get $key and $secret for the myspace.php class. Can anyone help me? Is $secret the given security key of the app? and is $key from www.myspace.com/$appid? where to get the appid, the user_id of the app profile or the appid shown in the edit app?

     

  • 03-11-2008 4:54 PM In reply to

    Re: PHP Client Library

    Update:
    I moved my code to a different server, without using a port, and I still got the digital signature problem.  The reason I moved it was because I was getting the "Authentication Failed" problem explained below and wanted to see if it was code or hardware related.  Another person is having the same issue where it works on one of his servers but not on the other: "Invalid Digital Signature" so it could very much be hardware or PHP related.

    Again, you can ignore the original reply to your help or you can read it to possibly see something I haven't.

    Thanks in advance. 

    ------------ 

    Jeremy,

     

    Good observation.  I have switched to using http://msdev.example.com instead of http://example.com:2222

    I am now receiving the following error:

     

    Authentication failed. Failed to resolve application URI "http://msdev.example.com" when just pasting the $URL that is generated right before it is cURL'd into the browser, as well as on OAuthTool.  Which is different than my previous case when using my old URL, it indeed worked in the OAuthTool.

     

    Any insight will be greatly appreciated.

     

    Note:

    example.com has been used instead of my actual domain and I have made sure to change the URL in the Application Details URI and also the URL that my iframe is loading (now only needing to specify the URL via a handy little tool on the Edit Source page) and of course my Consumer Key variable.  Perhaps there is some place I am missing.

     

    Thanks in advance. 

  • 03-12-2008 5:33 AM In reply to

    Re: PHP Client Library

    This one has me stumped...

    Do me a favor, though, because this is the first I've heard of someone actually switching their Application URI to a domain outside MySpace -- check to see what your app is passing as the oauth_consumer_key (it'll be in the querystring); I'm wondering it still isn't going to be your old 'www.myspace.com/[appid]'. We were told early on to use the Application URI as the Consumer Key, but I'm not sure if that's because it was a convienent place to find the thing, or because that's exactly what MySpace always uses.

    And another thing; you said you're using msapp.example.com (I know it's made up), but does it actually exist? Could I, for example, type 'msapp.example.com' into my browser and hit a site? I'm wondering, too, if the 'Can't resolve...' issue might be that it doesn't think your URI actually exists.

    Otherwise, I'm drawing a blank. The PHP library has been solid so far, and it's seems highly unlikely that its hardware if OAuthTool is giving you an error as well.

    And to Shiela, your Application URI, two lines above where you found your Security Key (which is your Consumer Secret) is what you'd use for your Consumer Key.... At least, so far it's been...

  • 03-12-2008 9:18 AM In reply to

    Re: PHP Client Library

    Jeremy,

     Just so I can try your first suggestion before continuing with the others, where am I to get my appid for 'www.myspace.com/[appid]'?  Right now, I see the URL:

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

    which is 123456, and when I do www.myspace.com/123456 it takes me to some chicks myspace profile :-D

     Thanks again for your help. 

     

    Note:

    123456 is a placeholder for my actual app id 

  • 03-12-2008 9:24 AM In reply to

    Re: PHP Client Library

     My consumer key is my own domain and it works fine with OAuth.

Page 4 of 9 (134 items) « First ... < Previous 2 3 4 5 6 Next > ... Last »