Skip to main content

Life Cycle Event Request

Request Types​

addapp​

An event that occurs when an application is added.

Parameter nameDescription
eventtypeEvent type (event.addapp)
opensocial_app_idApplication ID
idUser ID of the user who installed the application
mbga_invite_fromUser ID of the user who sent the invitation
mbga_is_shellappFlag indicating whether the Shell App Framework is used (always 1)

removeapp​

An event that occurs when an application is uninstalled.

Parameter nameDescription
eventtypeEvent type (event.removeapp)
opensocial_app_idApplication ID
idUser ID of the user who uninstalled the application

joingroup​

An event that occurs when a user joins an official group of the game.

Parameter nameDescription
eventtypeEvent type "event.joingroup"
opensocial_app_idApplication ID
idUser ID of the user who joined an official group of the game

leavegroup​

An event that occurs when a user leaves an official group of the game.

Parameter nameDescription
eventtypeEvent type "event.leavegroup"
opensocial_app_idApplication ID
idUser ID of the user who left an official group of the game

postdiary​

An event that occurs when a diary entry for the game is written.

Parameter nameDescription
eventtypeEvent type "event.postdiary"
opensocial_app_idApplication ID
mbga_diary_idDiary ID
idUser ID of the user who wrote the diary entry for the game

Request Format​

  • id: Example: player 101 invites player 102, who has installed application A.

    http://www.example.com/addapp?opensocial_app_id=A&eventtype=event.addapp&id=102&mbga_invite_from=101&mbga_is_shellapp=1
  • id: Player 101, id: Player 102, id: Example: player 103 installs application A which triggers a notification.

    http://www.example.com/addapp?opensocial_app_id=A&eventtype=event.addapp&id=101&id=102&id=103&mbga_is_shellapp=1
  • id: Player 101, id: Example: player 102 joined the official group of application A

    http://www.example.com/joingroup?opensocial_app_id=A&eventtype=event.joingroup&id=101&id=102
  • id: Example: player 101 wrote a diary entry for application A.

    http://www.example.com/postdiary?opensocial_app_id=A&eventtype=event.postdiary&id=101&mbga_diary_id=10001

A signature is applied to a request by OAuth. You should always verify the validity of the Authorization request header.

Response​

Status: 200
Content-Type: text/plain

OK

If a response other than 200 is returned, an error is assumed to have occurred and the request is resent during the next notification. It is also an error if no response is returned more than 10 seconds after a request is sent. If the same notification error keeps occurring at regular intervals, it will be dropped.

Restrictions​

Currently, lifecycle events have the following limitations.

  • joingroup, leavegroup, and postdiary events are not reported if the user has not installed the application or has already uninstalled it.
    - mbga_is_introduced parameters by function that Inviting a friend outside is the only SmartPhoneWeb and Mobile.

    OpenSocial v1.0 Lifecycle Events
    OpenSocial v0.9 Lifecycle Events

Revision History​

  • 09/30/2012
    • Initial release
  • Request Types
    • addapp
    • removeapp
    • joingroup
    • leavegroup
    • postdiary
  • Request Format
  • Response
  • Restrictions
  • Reference Links
  • Revision History