skip to main | skip to sidebar

opensocial-actionscript-client

This blog will show the development activities and some general rants about opensocial-actionscript-client project. opensocial-actionscript-client is an opensource library for actionscript (and Flex/Flash) to access Google's Opensocial API. :)

February 18, 2009

requestSendMessage Example with Callback


    private function sendEmail():void
{
var msgParams:Object = {};
msgParams
[com.nextgenapp.opensocial.Message.Field.TITLE] = 'test title';
msgParams
[com.nextgenapp.opensocial.Message.Field.TYPE] = com.nextgenapp.opensocial.Message.Type.EMAIL;

var message:Message = container.newMessage("test msg body", msgParams);
container
.requestSendMessage(["VIEWER"], message, sendEmailCallback);
}
private function sendEmailCallback(respItem:ResponseItem):void
{
// note: requestSendMessage() returns ResponseItem, not DataResponse.
trace
("sendEmailCallback");
Alert.show("sendEmailCallback. haderror=" + respItem.hadError());
if (respItem.hadError()) {
// get the response item
Alert.show("sendEmailCallback. errorCode=" + respItem.getErrorCode() + ". errorMessage=" + respItem.getErrorMessage());
}
}

A full sample code can be found here: http://opensocial-tutorial-trial.googlecode.com/svn-history/r180/trunk/os-as-lib-081-test/src/SendMsgExampleOrkut.mxml

Posted by Sol Wu at 2/18/2009
Labels: actionscript, example, opensocial

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Links

  • opensocial-actionscript-client Main Site
  • Facebook Actionscript Library


Blog Archive

  • ▼  2009 (19)
    • ►  April (1)
    • ►  March (1)
    • ▼  February (17)
      • Create Activity feature added to the library
      • Examples for reading & writing appData
      • requestSendMessage Example with Callback
      • requestSendMessage() callback returns a ResponseIt...
      • Changing constant value to small case
      • requestSendMessage() is implemented
      • Difference between email & notification on Orkut
      • Facebook Developer Garage Palo Alto - Feeds and So...
      • DataResponse.getErrorMessage() showing undefined f...
      • Preliminary AppData implementation
      • fetchPersonAppData data structure
      • WeekendApps - OpenSocial
      • opensocial javascript api rants
      • Difference between MySpace and Orkut – part2
      • Difference between MySpace and Orkut – part 1
      • Overview
      • Design Concept

Network

NetworkedBlogs
Blog:
Opensocial-actionscript-client
Topics:
opensocial, actionscript, flash
 
Follow my blog

Followers

Contributors

  • Aaron
  • Sol Wu
  • solwu

Subscribe To opensocial-actionscript-client blog

Posts
Atom
Posts
Comments
Atom
Comments