Decoder,
Add a callback to your createactivity call in order to debug what is going
on. It is also good to check using firebug.
PS: Did you notice a typo here ( "L" )?
params[opensociaL.MediaItem.Field.THUMBNAIL_URL] = streamThumbnail;
function publishTimeLeft(){
var timeLeft = document.getElementById("cntdwn").innerHTML;
var streamTitle = "Time left to Cricket World Cup - 2011";
var streamBody = timeLeft;
var streamThumbnail = "
https://dl.dropbox.com/u/9999259/cricket_world_cup_countdown_logo.png";
var params = {};
params[opensocial.Activity.Field.TITLE] = streamTitle;
params[opensocial.Activity.Field.BODY] = streamBody;
params[opensocia.MediaItem.Field.THUMBNAIL_URL] = streamThumbnail;
var activity = opensocial.newActivity(params)
opensocial.requestCreateActivity(activity,
opensocial.CreateActivityPriority.HIGH, callback);
}
function callbackAtividade(status)
{
if (status.hadError())
alert("DATA: "+ status.getData()+" MSG: "+ status.getErrorMessage()+"
CODE: "+ status.getErrorCode());
else
alert("done");
}
Robson Dantas
@robsondantas
2011/1/11 Decoder <[email protected]>
> The code for publishing update is as follows:
>
> function publishTimeLeft(){
> var timeLeft = document.getElementById("cntdwn").innerHTML;
> var streamTitle = "Time left to Cricket World Cup - 2011";
> var streamBody = timeLeft;
> var streamThumbnail = "https://dl.dropbox.com/u/9999259/
> cricket_world_cup_countdown_logo.png";
>
> var params = {};
> params[opensocial.Activity.Field.TITLE] = streamTitle;
> params[opensocial.Activity.Field.BODY] = streamBody;
> params[opensociaL.MediaItem.Field.THUMBNAIL_URL] = streamThumbnail;
>
> var activity = opensocial.newActivity(params)
> opensocial.requestCreateActivity(activity,
> opensocial.CreateActivityPriority.HIGH, function(){});
> }
>
> but it is not working... still waiting for solution
>
> On Jan 11, 9:17 am, Decoder <[email protected]> wrote:
> > Hi all,
> >
> > I have made a simple application in which update should be published
> > in activity stream of user on click of - 'Inform your friends &
> > celebrate!' button, but it is not working as coded.
> >
> > Can anyone suggest me, if I have done anything wrong? The url for
> > application is-
> http://dl.dropbox.com/u/9999259/cricket_world_cup_countdown.html
> >
> > Thanks,
> >
> > Decoder
>
> --
> You received this message because you are subscribed to the Google Groups
> "orkut Developer Forum" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<opensocial-orkut%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/opensocial-orkut?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"orkut Developer Forum" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/opensocial-orkut?hl=en.