Acquiring an Avatar

Preliminary preparation

Each Mobage user has an avatar. An API is offered in Mobage Open Platform so that users can use their avatars within applications.

In order to use this API, you must define the mbga feature specifications with the Require element in the Gadget XML.

Acquiring a VIEWER’s avatar

The following is a sample for acquiring a VIEWER’s avatar.

  • Create an IdSpec for the target user. Now specify VIEWER, OWNER, or an arbitrary user ID for USER_ID with an array. Only SELF can be specified for GROUP_ID.
  • Make a request to acquire avatar information using the mbga.requestFetchAvatar() method.
  • When the request is successful, the mbga.Avatar object is stored in DataResponse and is returned.

Specifying more detailed avatar attributes

Acquiring avatars from multiple users

Acquiring avatars from multiple users

Avatars from multiple users can be obtained simultaneously. Follow the steps below to acquire avatars from the VIEWER’s Mobatomo (Friends).

  • First, acquire a VIEWER’s Mobatomo (Friends) with the newFetchPeopleRequest() method.
  • Create an array of Mobatomo (Friends) user IDs.
  • Make this array an argument for the requestFetchAvatar() method, and make a request to acquire information on the avatars.
  • Process the DataResponse when multiple users are specified, as the collection of Avatar objects will be stored in it.

Revision History

  • 12/2010
    • Initial Release.

PREVIOUS

Writing Diary Entries

NEXT

Inputting and Displaying Free Text