Hi everybody,

I created a small application and I am trying to send users and users'
friends notifications but I failed  and also I couldn't display any
activity.

Here is my code:

For notifications:

          var params = {};
          params[opensocial.Message.Field.TITLE]="My Game";
          params[opensocial.Message.Field.TYPE]
=opensocial.Message.Type.NOTIFICATION;
          var body="Tanadu";
          var message = opensocial.newMessage(body, params);
          var recipient = toIds;
          opensocial.requestSendMessage(recipient, message,
onSendNotification);

 and for activities:

      var activityParams = {};
    activityParams[opensocial.Activity.Field.TITLE] = 'Enjoy the
Game';

    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']);

Both seems correct but I couldn't find the problem. I want my app send
notification and I want to display activity on users' profile.

Any suggesstion would be appreciated. Please help if you have any
idea.

Thanks already.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenSocial Application Development" 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-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to