Thank you very much for your reply but it didn't work and also I
tried this code too:

    var activityParams = {};
    activityParams[opensocial.Activity.Field.TITLE] = 'tanadu';
    var mediaItems = new Array();
    var mediaItem =
opensocial.newActivityMediaItem(opensocial.Activity.MediaItem.Type.IMAGE,
viewer.getField(opensocial.Person.Field.THUMBNAIL_URL));
    // Add a media item link if supported
    mediaItems.push(mediaItem);
    activityParams[opensocial.Activity.Field.MEDIA_ITEMS] =
mediaItems;

    var activity = opensocial.newActivity(activityParams);
    opensocial.requestCreateActivity(activity,
opensocial.CreateActivityPriority['HIGH']);

but it failed also. I couldn't preview any notifications on my profile
or friend's profile. Also I am not sure if we can display notification
on friendster profile. I got stuck, pls help :(


On Sep 24, 12:57 am, [EMAIL PROTECTED] wrote:
> I believe that I got the following to work on Friendster:
>
> function sendNotification() {
>   var params = {};
>   params[opensocial.Message.Field.TITLE]="Title of thenotification
> goes here";
>   params[opensocial.Message.Field.TYPE] =
> opensocial.Message.Type.NOTIFICATION;
>   var body="Text of thenotificationgoes here";
>   var message = opensocial.newMessage(body, params);
>   var recipient = opensocial.DataRequest.PersonId.OWNER;
>   opensocial.requestSendMessage(recipient, message,
> onSendNotification);
>
> };
>
> function onSendNotification(resp) {
>   //do something with the response here.
>
> };
>
> sendNotification();
>
> Let me know if this helps,
> ~Arne
>
> On Sep 18, 12:48 am, mabel <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> > I am newbie about the opensocial application development. I created a
> > small app for friendster and I want tosendnotifications to the users
> > and friends of users.
>
> > I really don't have idea hownotificationmechanism works. Could you
> > please help for it?
>
> > Any suggestion would be appreciated.
> > Thanks....
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenSocial Application Development" group.
To post to this group, send email to opensocial-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to