Knowledgebase

Social Notifications


Overview

OpenFeint social notifications allow you to announce to a player’s friends what he is doing in your game. Social Notifications have the following features:

  • Sent to a player’s Facebook and/or Twitter Stream.
  • Must be no greater than 125 characters in length.
  • Are always prefixed with I or My Name.
  • Have an optional pre-uploaded image associated with it
  • Are automatically sent out when a player unlocks an achievement.
  • Always request permission from the player before sending.
  • Are referred to as “Published Game Events” in the OpenFeint Dashboard screens.

Quick Start

Simply send a notification from your application through either of the following APIs:

  • [OFSocialNotificationApi sendWithText:@"just gained a level", nil]; // high level api
  • [OFSocialNotificationService sendWithText:@"just gained a level"]; // low level api

Header Files

  • OFSocialNotificationApi.h (high level api, preferred)
  • OFSocialNotificationService.h (low level api)

These notifications keep popping up during gameplay and interrupting the player! What gives?
Since we automatically prompt the user to post a notification after an achievement is unlocked this is often the case. We are actively working on a solution to this issue (which will probably end up similar to the OFNotificationDelegate which handles the small pop-up notifications).

Sending a Text and Image Notification

  1. Upload an image to the Facebook Notification Images section the Developer Portal.
  2. In your application, send the notification with [OFSocialNotificationService sendWithText:@"shared the space ship with the world" imageNamed:@"ImageIdentifierName"];

What exactly will a notification say?

All social notifications are prefixed with a proper noun referring to the player. Here are some example notification texts and their final appearance on social networks:

  • Submitted Text: just gained a level
  • On Facebook: Jason just gained a level
  • On Twitter: I Just gained a level
  • Submitted Text: wandered into an open forest.
  • On Facebook: Jason wandered into an open forest.
  • On Twitter: I wandered into an open forest.
  • Submitted Text: saved the forest ten times today.
  • On Facebook: Jason saved the forest ten times today.
  • On Twitter: I saved the forest ten times today.

Social Notifications and Privacy

Depending upon the social network, OpenFeint uses a one or two-stage authentication process before sending a social notification on behalf of a player.

  1. Requests extended permissions if necessary. This may require a user enter their social network username and password again.
  2. Display the notification to the user and ask for permission to publish the notification. Users may opt to remember their selection. By default, remember is OFF.

App Approval Required For Testing

Currently OpenFeint requires that an application has requested approval and been approved before posting to social networks. See the big green "Prepare for Submission" button on the OF dev dashboard. We do this so that you don't accidentally broadcast that you are adding OpenFeint to your game before you're ready.