Other Users

Provides access to and interaction with other users. For the current user, see blackberry.bbm.platform.self.

BBM social graph:

Applications can listen for changes in the social graph by assigning a callback to blackberry.bbm.platform.user.onupdate. Events are fired for both the current user and their contacts who have the application installed. You can listen for user profile property changes, such as display name and display picture, and also when a user installs/uninstalls your application.

Functions:
void inviteToDownload()
Events:
void onupdate

inviteToDownload()

Allows the user to invite contacts to download the application. An invitation card appears, allowing the user to select contacts to invite.

Only contacts who do not have the application installed can be invited to download.

Synopsis:

void blackberry.bbm.platform.users.inviteToDownload()

onupdate

Event listener when a user's information is updated. Assign a function to receive user updates.

User updates can be captured such as profile information and application installation changes. Updates can be received from the current user, contacts who have the application, and non-contacts who have joined in an application connection with the current user.

  • "displayname": Display name update.
  • "personalmessage": Personal message update.
  • "status": Status and/or status message update.

Synopsis:

Event

Parameters:

user {BBM Platform User}

The user whose information was updated.

event {String}

The type of update.

Example:

<script type="text/javascript">

    document.addEventListener("onupdate", function(user, event) {
        // Handle events for other user
        if (event == "personalmessage") {
            alert("Personal message update: " + user.personalmessage);
        }
    };

</script>
            

Last modified: 2014-10-09



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus