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 7 of 9 (134 items) « First ... < Previous 5 6 7 8 9 Next >
Sort Posts: Previous Next
  • 03-24-2008 5:01 AM In reply to

    • saleem
    • Not Ranked
    • Joined on 03-19-2008
    • Posts 3

    Re: PHP Client Library

    Hi,

    I am using this liabrary (OAuth.php and Space.php) to get the information from myspace account say profile.

    I have created a php file, the code of that file is :

    <?php
    require_once ('Space.php');
    $key = 'http://www.myspace.com/358470541';
    $secret = '503ca5f3878843ee808a3936bd0bbf56';
    $s = new Space($key, $secret);
    $hProfile = $s->profile(358470541);
    ?> 

    When i run this code getting the following error:

    file_get_contents(http://api.msappspace.com/v1/users/358470541/profile.xml?oauth_consumer_key=http%3A%2F%2Fwww.myspace.com%2F358470541&oauth_nonce=53656303004c8817694c1d5bcb250443&oauth_version=1.0&oauth_timestamp=1206359816&oauth_token=http%3A%2F%2Fwww.myspace.com%2F358470541&oauth_signature_method=HMAC-SHA1&oauth_signature=wzOMz0lL1tfB%2BSfSVuTm0GXhw%2BM%3D) [function.file-get-contents]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in Space.php on line 177

    Fatal error: Maximum execution time of 60 seconds exceeded in Space.php on line 177

    Thanks

    Saleem

     

  • 03-25-2008 12:45 AM In reply to

    Re: PHP Client Library

     You will get the same response. This is an error with regards to bad input when calling the Space.php and OAuth.php, you're probably calling an ID of someone who hasn't added the App yet.

     Add yourself as a user of the app and call your ID, and I know you'll have better luck. Make sure you followed all the other directions in the tutorial I gave you. I hope that helps.

  • 04-04-2008 2:41 AM In reply to

    Re: PHP Client Library

     Hello Trevor

                            I am sanjeev.i am also got the same error can you please help me to resolved

                            this prolem.

    Thanks Sanjeev.
     

  • 04-04-2008 4:14 AM In reply to

    Re: PHP Client Library

    Hi,

    i got this error  Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/popflyz/public_html/devversion/Chat_App/Space.php on line 30

    Please help me brother.

    Sanjeev. 

  • 04-04-2008 11:59 AM In reply to

    • andy
    • Top 150 Contributor
    • Joined on 02-05-2008
    • Posts 33

    Re: PHP Client Library

    Myspace recently changed their REST server from api.msappspace.com to api.myspace.com. If you're getting errors you should try changing that address in the Space.php file.
  • 04-04-2008 10:18 PM In reply to

    • mNeo
    • Top 25 Contributor
    • Joined on 02-05-2008
    • Posts 109

    Re: PHP Client Library

    Sanjeev, I think that's because your server is PHP4 based?

    Guys, is there any solution for us PHP4 users? I am new to PHP, so I don't know if it's just a matter of getting rid of "private, public, protected" from the Space.php and OAuth.php files or it is much more complicated than that.


  • 04-07-2008 4:53 AM In reply to

    Re: PHP Client Library

    Hello thanks for replay but now server support PHP 5 extension.

    But i got same error.

    Please give me sample code.

    Thanks and regards. 

  • 04-07-2008 4:59 AM In reply to

    Re: PHP Client Library

    Yes Yes Yes    

    Thanks yaar,

                        I got my information on my server.Once again very thankful to you....

    Regards -

    Sanjeev Viahwakarma. 

  • 04-13-2008 11:35 AM In reply to

    Re: PHP Client Library

    I got the code running and it already made my life 100x easier. I had a couple questions though. Is there any way filter what info is returned from a call to friends forthe viewing user. And, either way, is there a way to change the number of items returned per call? I tried $hProfile = $s->friends(55331270, '', 50); to return 50 friends but it gives me an error.

  • 04-13-2008 11:57 AM In reply to

    Re: PHP Client Library

     One more quick question actually. Can you filter the results to only include their friends that have my app installed?

  • 04-13-2008 7:07 PM In reply to

    Re: PHP Client Library

    Currently, no. Even if it had been built in the library (it might be, actually), the RESTful API doesn't currently support that filter.

    It's on it's way. No ETA, though.

  • 04-14-2008 11:49 AM In reply to

    Re: PHP Client Library

    Unfortunate. The code is amazing though and made life so much easier. I do have one problem though. I get this seemingly random error:

    Fatal error: Cannot use string offset as an array in /home/gnsxtyaa/web/public/foodfight/myspace/Space.php on line 184

    It only happens about 5% of the time but it occurs on calls that should be exactly the same. Anyone have any clues as to what may cause this error? 

  • 04-15-2008 2:28 PM In reply to

    Re: PHP Client Library

    These are the ONLY calls I'm making the the Space class.

    $key = 'http://www.myspace.com/365971513';
    $secret = '16c.........................................34';
    $s = new Space($key,$secret);

    $arefriends=$s->friendship($uid, array(0 => $fid));
           
            if($arefriends['friendship']['friend']['arefriends']=='True')
            {
                $friend=$s->user($fid);
                     return $friend['displayname'];
            }

    Any ideas? This is the last bug I have to work out and no matter what I do, it doesn't seem to fix it... 

  • 04-18-2008 2:11 PM In reply to

    • Dave
    • Not Ranked
    • Joined on 04-10-2008
    • Posts 9

    Re: PHP Client Library

    I have just installed this library (my app was sorta working already, but I want to try this library). I also get:

    Notice: Undefined index: BODY in /var/www/myserver//myspace/unofficial/Space.php on line 184

    Fatal error: Uncaught exception 'Exception' with message '401 ' in /var/www/myserver/myspace/unofficial/Space.php:184 Stack trace: #0 /var/www/myserver/myspace/unofficial/Space.php(143): Space->_do_request('users/12341234...', Array) #1 /var/www/myserver/myspace/unofficial/Space.php(60): Space->do_request('users/12341234...') #2 /var/www/myserver/myspaceentry.php(102): Space->profile(12341234) #3 {main} thrown in /var/www/myserver/myspace/unofficial/Space.php on line 184

    Note the 'BODY' problem. I sussed the message to be:

    Could not identify or did not find an approved authentication protocol. Check the targeted host and all necessary parameters.

    Why is this happening? Which is the 'targeted host' and what parameters might I need to check? I'm just calling

    $hProfile = $mySpace->profile(12341234);

    Seems like other people have had spotty success with this, I didn't see a definitive solution in the rest of the thread. I tried user ids for 'me', the app account, and a friend, none of them got past this.

     

  • 04-18-2008 4:03 PM In reply to

    Re: PHP Client Library

    Dave,

    If they ever provide a PHP example for the following post, then it will probably answer your question also:

    http://developer.myspace.com/Community/forums/t/1751.aspx

    I sent a MySpace message to Johnny@myspace this morning regarding this issue; no reply from him yet.

Page 7 of 9 (134 items) « First ... < Previous 5 6 7 8 9 Next >