Welcome Developers!

in

Welcome!

in

How to make PHP SDK work?

Last post 11-08-2010 11:19 AM by Joel. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 10-18-2010 11:58 AM

    • Tomasz
    • Not Ranked
    • Joined on 09-28-2010
    • Posts 3

    How to make PHP SDK work?

    Hello,

    My OAuth Consumer Key: is  http://www.myspace.com/551804372

    and OAuth Consumer Secret is "4d6898d03b24491abc57e98f67508c7e828f9821d84d433b8b541f1865a89fa6"

     Is used your tutorial: http://wiki.developer.myspace.com/index.php?title=Example_Application:_Hello_World to create APP. BTW. This tutorial is obsolete

     I set app to "External IFrame"  and provided proper URL to my server location.

    Than I downloaded Your SDK for PHP from here:

    http://wiki.developer.myspace.com/index.php?title=MySpaceID_SDK_for_PHP

    and put on my server. Went to "config.MySpace.php" and set:

        //please register at http://developer.myspace.com for a CONSUMERK_KEY
        define('CONSUMER_KEY', 'http://www.myspace.com/551804372');

        //please register at http://developer.myspace.com for a CONSUMER_SECRET
        define('CONSUMER_SECRET', '4d6898d03b24491abc57e98f67508c7e828f9821d84d433b8b541f1865a89fa6');

        // for testing purpose auth tokens & secrets (unit test cases)
       
        define('OAUTH_TOKEN', 'http://www.myspace.com/551804372');

        define('OAUTH_SECRET', '4d6898d03b24491abc57e98f67508c7e828f9821d84d433b8b541f1865a89fa6');
       
        define('APP_ID', '551804372');
        define('FRIEND_ID', 'FRIEND ID HERE');

    Next I set location of my IFrame app to "samples\myspaceid-onsite"

    And when I display my app i see this:

    Hello, this is an onsite app using the MySpaceID PHP SDK.


    Warning: Missing argument 5 for OAuthRequest::__construct(), called in /home/admin/www/test/myspace_platform/source/OAuth/OAuth.php on line 181 and defined in /home/admin/www/test/myspace_platform/source/OAuth/OAuth.php on line 136

    Notice: Undefined variable: body in /home/admin/www/test/myspace_platform/source/OAuth/OAuth.php on line 146

    Warning: Missing argument 3 for OAuthSignatureMethod_HMAC_SHA1::build_signature(), called in /home/admin/www/test/ms_quizz/index.php on line 146 and defined in /home/admin/www/test/myspace_platform/source/OAuth/OAuth.php on line 69

    Notice: Undefined variable: token in /home/admin/www/test/myspace_platform/source/OAuth/OAuth.php on line 78

    Base string = GET&http%3A%2F%2Fwww.myspace.com%2F551804372&appid%3D196614%26country%3Dpl%26installState%3D1%26lang%3Dpl%26mc%3DUOC%26oauth_consumer_key%3Dhttp%253A%252F%252Fwww.myspace.com%252F551804372%26oauth_nonce%3D634230244136953331%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1287427613%26oauth_version%3D1.0%26opensocial_owner_id%3D535906599%26opensocial_surface%3Dcanvas%26opensocial_token%3DHxnrLpjr8Rnkp3hdvrnd1yMfNYWXZjkFykQn0MGLDoJcU96cajKOZavsz%25208wSKpOnNSoewaWF31wgudDpp5YHs6aCnyy7t2zzA9xASQitzs%253D%26opensocial_viewer_id%3D535906599%26ownerId%3D535906599%26perm%3D%255B%2522RN%2522%252C%2522PB%2522%252C%2522SN%2522%252C%2522%2522%252C%2522BI%2522%252C%2522FL%2522%255D%26ptoString%3DCOMMENTS%252CBLOG%252CBULLETINS%252CPROFILE%252CSEND_MESSAGE%252CSHARE_APP%252CACTIVITY%252CADD_TO_FRIENDS%252CAPP_MESSAGE%26viewerId%3D535906599
    Built Signature = oHZ0R0jnBvsKmoCsugnCmTAj88c=
    Passed in Signature = INLtKpyQAcide+bgagMdySmVIR4=
    Signatures don't match! Exiting.

     

    So my question is: how to make it work?

    best wishes

    Tom

  • 10-19-2010 2:41 PM In reply to

    Re: How to make PHP SDK work?

     Can you please email a Wireshark .pcap http capture of this request/response to developerrelations@myspace-inc.com?

     

    thanks,

    Joel

  • 10-26-2010 3:47 PM In reply to

    Re: How to make PHP SDK work?

     I think it is as simple as the fact that you are using the MyspaceID php sdk (for external apps) for an onsite app (in an external iframe). Your consumer key is an onsite consumer key and that probably explains why none of your calls would work. Onsite apps don't require the oauth sequence like offsite (MyspaceID) apps do. MyspaceID apps are for offsite (ie not anywhere on the Myspace website, even if the app is running from an external iframe).

     

    thanks,

    Joel

  • 10-28-2010 1:53 PM In reply to

    Re: How to make PHP SDK work?

    Also there is an issue with what you are using if you have php 5 from what i have been reading .

  • 10-28-2010 2:15 PM In reply to

    Re: How to make PHP SDK work?

     Well, we have an updated PHP SDK which should work fine with it.

     

    thanks,

    Joel

  • 11-02-2010 11:24 PM In reply to

    • Tomasz
    • Not Ranked
    • Joined on 09-28-2010
    • Posts 3

    Re: How to make PHP SDK work?

    Hello,

     I went today again into SDK's directory: http://wiki.developer.myspace.com/index.php?title=Category:SDKs

    And as i can see there is

    MySpaceID SDKs

    MySpace SDKs

    So as you said, I didn't go to MySpaceID now (since as you write it's for offsite apps) and went to the second one, called MySpace SDKs.

    And there is on the right a bunch of SDK's and for PHP it's called:

    MySpace SDK for PHP

    And when I point it with cursor I see a link to

    http://wiki.developer.myspace.com/index.php?title=MySpaceID_SDK_for_PHP

    So in reality it's MySpaceID_SDK. So I assume it's not what i am looking for.

    And on the second hand in "Downloadable Libraries" (http://wiki.developer.myspace.com/index.php?title=Downloadable_Libraries) i see that there is only library for REST:

    http://wiki.developer.myspace.com/index.php?title=MySpace_REST_API_PHP_Library

    and unofficial library for rest:

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

     But I need a whole SDK for application dev and not only library or am I missing something here?

    Can you please tell me where I can than find a PROPER SDK for application developed on the MySpace?

    kind regards,

    tom

    Filed under: ,
  • 11-07-2010 5:48 PM In reply to

    • Tomasz
    • Not Ranked
    • Joined on 09-28-2010
    • Posts 3

    Re: How to make PHP SDK work?

    I wait now for 6th day now for answer and still get nothing that could help me write an app for MySpace. I feel bad, it's so hard to do something I thought will be easy. No help for weeks now, i'm lost in my space.
  • 11-08-2010 11:19 AM In reply to

    Re: How to make PHP SDK work?

     Your question was escalated but we've been busy on the new site. 

     

    thanks,

    Joel

Page 1 of 1 (8 items)