Hi All,
I am trying to post an activity on my friends page using the SDK provide by : https://github.com/myspace/myspace-iphone-sdk
The method I am using is :
/*
* OpenSocial v0.9 Activities
* Resource: http://opensocial.myspace.com/roa/09/activities/@me/@self?
* Details: http://wiki.developer.myspace.com/index.php?title=OpenSocial_v0.9_Activities
* Description: Create Activity
* @param mixed $personId current Person Id
* @param mixed $externalId external Id
* @param integer $title title of the activity
* @param integer $body body of the activity
* @param dictionary $templateParams Dictionary parameter
* @param string $titleid titleId of the activity
* @return object of php object representing the url of newly created activity
*/
public function createActivity($personId, $externalId, $title, $body, $templateParams, $titleId){
$externalId="562938786";
$title="test";
$body="I am ravi here";
$templateParams="";
$titleId="11111";
echo $this->restV9->createActivity($personId, $externalId, $title, $body, $templateParams, $titleId);
}
Please let me know if I am correct with the parameters :
$personId => Is my profile ID with myspace
$externalId =>Is my FRIENDS profile ID with myspace
$templateParams => I an bot sure what this should be, so left it blank
$titleId="11111" => even not sure what this should be....
1. I am able to connect to MySpace import contacts and fetch updates.
2. But when I post a message, I get the below error
[error] [client 220.227.236.18] PHP Fatal error: Uncaught exception 'MySpaceException' with message 'Requested --> http://opensocial.myspace.com/roa/09/activities/562938918/@self? \r\nResponse:
\r\n\r\n
\r\n\r\n\r\n::myspace response::@2011-02-24T06:38:47+00:00\r\n_____________________________________________\r\n:: contentType :: \r\n\r\n\r\n:: status :: \r\n404\r\n\r\n:: headers :: \r\nHTTP/1.1 404 Not Found\r\nServer: Microsoft-IIS/7.5\r\nX-Server: 806986a7d69f098f27de34c5f2b81dd8e3771a905ad33120\r\nX-PoweredBy: Nerd Rage\r\nDate: Thu, 24 Feb 2011 06:39:16 GMT\r\nContent-Length: 131\r\n\r\n:: body :: \r\n{"statusCode":"404","statusDescription":"No REST endpoint was found for this request. Please check the URI and HTTP method used."}\r\n\r\n:: raw :: \r\nHTTP/1.1 404 Not Found\r\nServer: Microsoft-IIS/7.5\r\nX-Server: 806986a7d69f098f27de34c5f2b81dd8e3771a905ad33120\r\nX-PoweredBy: Nerd Rage\r\nDate: Thu, 24 Feb 2011 06:39:16 GMT\r\nContent-Length: 131\r\n\r\n{"statusCode":"404","statusDescription":"No REST endpoint was found for this request. Please check the URI and HTTP method used."}\r\n\r\n' in /var/ in /var/www/html/contaxz/app/vendors/myspace/context/MySpaceContext.php on line 475, referer: http://linux.aress.net/contaxz/contacts/viewContactProfile/5205
Please suggest
Thanks