Facebook Feed Dialogue as a Replacement to the Deprecated Facebook Share

Facebook announced in February of 2011 that they were deprecating the "share" functionality, which provided an easy way for users to share a link or page to their feed. What was nice about sharing, from a development perspective, was that you could simply link to the sharer.php page without any additional configuration required (i.e., www.facebook.com/sharer.php?u=http://singlebrook.com). One of our clients was using this functionality extensively, and even though it was officially deprecated, it continued to work as expected--until about two weeks ago.

Go to the above link and you won't see any visible changes. The scrape is still working, and a user can indeed post to their wall. The problem is, however, shared posts are no longer appearing in friends' feeds. In other words "post to your wall" is now literally true, because that's the only place we could find the shared links appearing. Though I haven't found any reference to a clear decision by Facebook to remove these posts from a feed, the effect was that we needed to scramble quickly to find an alternative approach to sharing.

Facebook's "Feed Dialogue" came to the rescue. The documentation is clear, and implementation requires only slightly more work than the share functionality (you have to register the application so that you can pass the API key to Facebook). You can pass custom properties to the API (such as a title, description, link and picture), or you can allow Facebook to scrape the provided link and attempt to generate the relevant properties from the data on the page.

The only real challenge we faced in the implementation was related to the source parameter, which we were using to pass the URL of the flash movie that the user was sharing. However, since the feed API doesn't accept a width or height parameter, the videos were being loaded at a default size of 400px x 224 px. Luckily, Facebook's scraping engine understands and respects the open graph tags on the linked page. So, in order to solve the size issue, we simply had to remove the source parameter and let the open graph tags do their magic.

Moral of the story: take deprecation warnings seriously and find alternatives before clients start calling to inquire why one of their business-critical features is no longer working.

Tags: tech