Platform Update: User Viewport Info, Per-Post Impression Data From Pages

The most recent Facebook Developer Blog’s update announced the ability for developers to pull information about the viewport their application is being displayed in and scroll to a specific point. Pages can now grant access to their per-post impression data to applications. Facebook also recounted recent changes we’ve previously covered including the inclusion of titles, images and descriptions in posts published by Like buttons, and the introduction of a preview of these posts seen when buttons are clicked.

The JavaScript SDK now includes new functions for iframe canvas apps. FB.Canvas.getPageInfo returns information about the height, width, and length of user’s window viewport and the application’s iframe viewport. This information can help a developer configure their app’s viewport to create the optimal viewing experience. FB.Canvas.scrollTo allows developers to scroll to a specific point in the app’s canvas by specifying pixel coordinates.

Viewport configuration will be especially useful as users move to using Facebook from a variety of devices with different screen sizes and resolutions. For instance, it can help developers show their dialogs in the right place. Viewport capabilities have become a standard part of mobile browsers through the use of viewport meta tags.

Applications that have receive the read_insights permission from a Page’s admin can now pull per-post impressions from the stream FQL table. This will allow third-party analytics tools to help Page admins determine what timing and content produces the most user engagement.

The Platform Update also included some details about how Facebook’s platform team spends their monthly “roach motel” day where they address the backlog of developer-submitted bugs. Along with trying to reproduce bugs and file them to be fixed, the team also writes watir tests. These Ruby libraries systemically test Facebook’s webpages by clicking buttons, following links, and filling in webforms.