Welcome Developers!

in

Welcome!

in

PHP OSAPI - Can't get event details

Last post 07-12-2010 11:37 AM by Joel. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-09-2010 2:03 AM

    • Rob
    • Not Ranked
    • Joined on 07-08-2010
    • Posts 1

    PHP OSAPI - Can't get event details

    Hi,

    I'm trying to write a PHP app that pulls my myspace events from my activity feed and then displays it on my personal site.  I've managed to run the OSAPI exmple for viewing activity feeds [http://wiki.developer.myspace.com/index.php?title=Activities#Retrieving_Viewer_Activities].  The problem I have is that the ouput doesn't contain any details of the events that I've created.  What do I need to do to get the event data associated with an activity?

    Thanks

    Rob

     

    MY CODE:

    $batch->add($osapi->activities->get($user_params), 'userActivities');

    // Send all batched commands
    $result = $batch->execute();

    // Demonstrate iterating over a response set, checking for an error & working with the result data.
    foreach ($result as $key => $result_item) {
        if ($result_item instanceof osapiError) {
          echo "<h2>There was a <em>".$result_item->getErrorCode()."</em> error with the <em>$key</em> request:</h2>";
          echo "<pre>".htmlentities($result_item->getErrorMessage())."<<nowiki>/</nowiki>pre>";
        } else {
          echo "<h2>Response for the <em>$key</em> request:</h2>";
          echo "<pre>".htmlentities(print_r($result_item, True))."<<nowiki>/</nowiki>pre>";
        }
    }

     

    THE OUTPUT:

    Response for the userActivities request:

    osapiCollection Object
    (
    [list] => Array
    (
    [0] => osapiActivity Object
    (
    [id] => myspace.com.activity.tag:myspace.com,2009:/activity/542026347/ApplicationInnerActivity/119211/6122-331949647
    [mediaItems] => Array
    (
    )

    [title] => Rob Bryan has posted the event:
    )

    )

    [startIndex] => 1
    [totalResults] => 0
    [itemsPerPage] => 10
    [filtered] =>
    [sorted] =>
    [updatedSince] =>
    )
    </pre>

     

    Filed under: , ,
  • 07-12-2010 11:37 AM In reply to

    Re: PHP OSAPI - Can't get event details

    Is there any way you could get a Wireshark http capture of the request and response and send it to developerrelations@myspace-inc.com? I am not sure why it's doing this. It might be easier to create a Stream subscription then sort out different events on your end when the stream gets pushed to your endpoint. thanks, Joel
Page 1 of 1 (2 items)