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>