December 18 2018
December 17 2018
December 14 2018
We're continuously looking for ways to open core Facebook experiences to developers for innovation. Today we set our focus on two communication channels: notifications and the Facebook Inbox. We're excited to release two new APIs that will let your applications access your users' inboxes and notifications in a structured manner. In addition, you can make your stream applications available as attachments for Facebook messages so that users can more easily share application content with friends.
Last week we announced an update to the Open Stream API to allow integration of Page streams with applications. Today we are releasing the Inbox API so you can provide users with even more opportunities to interact with rich Facebook features within your applications. For example, a desktop application geared toward small business owners could enable users to check their company's Page stream, as well as read messages and receive notifications, all from their desktop.
The Inbox API allows you to access your users' messages, once they grant your application the new read_mailbox extended permission. This lets your applications provide an interface for users to view their messages. For example, your application could pop up an alert when the user receives a new message.
To access information about a user's Inbox, you'll query any of three new FQL tables:
While we currently don't allow applications to send messages through this API, we're always thinking about new functionality to offer through Facebook Platform.
To get started, as a developer you can access the Inbox APIs via the read_mailbox permission in order to develop and test your application. To launch your application to all users, please apply to the Inbox API whitelist here.
We've simplified the way you can create application attachments that users can share with their friends through Facebook messages. This feature works only with the new Inbox, which a number of users have been testing. The updated Inbox will launch to all users in the coming weeks.
The new Inbox incorporates the same Publisher used to publish to the streams on the home page and profiles. We've enhanced the Publisher so it no longer requires you to create template bundles -- you can now use the simplified attachment model that stream.publish uses. As we roll out the new Inbox over the next few weeks, we'll deprecate the old message attachment process.
To integrate your applications into the new Inbox:
We're still supporting existing Publisher integrations that use the "feed" content type, but you should find the flexibility of stream attachments easier to use, as they're more universal throughout Facebook.
The notifications API lets your applications retrieve your users’ notifications to use within your application. We've created a notification FQL table and two new API methods, notifications.getList and notifications.markRead, that let you retrieve structured information about notifications and mark them as read.
The new FQL table contains the same information used to generate the instant notifications you see on the Facebook website. We've opened up that data so now you can create better experiences for your users. For example, you can now create new desktop experiences integrating notifications, letting your users stay in touch with their friends and other connections. For example, Facebook for Adobe AIR now uses the notifications API and Inbox API to display notifications and new message alerts alongside the application window.
As always, we're looking forward to see what you do with these features, and we welcome your feedback in the Developer Forum.