Facebook is encouraging all application developers to start using Requests 2.0. This finally makes the long requested ability to share a non-Facebook page via requests possible. Personally, I’ve spent many an hour fighting with this process myself. While I did actually get it to work, it wasn’t a clean experience for the user and so I never blogged about it. Now with the new Requests 2.0, things have changed.
Here is a working example of a request on an application: These links allow you to send a request that will link back to either this post or the reveal tab post from earlier this week.
Sending the Request
Handling the Request Response
Facebook has added an additional burden to the application to clean up after itself. This really isn’t a big deal because we can simply delete the request once we’ve processed it. I’ve added the following code at the top of the default callback page for my application, it handles cleaning up the request the user is acting on as well as redirecting the user to the appropriate page.
Some parameters have length limits. In testing I wasn’t didn’t find a limit for the data field, but Facebook has documented the others.
- message This is what the recipient will see, it’s also displayed in the selector, Max length 255 characters
- title This is the prompt to encourage users to share this far and wide. Max 50 characters.
Updating Your App
Depending on when you created your application, this may actually be enabled already, but if your app is older, you’ll need to flip the switch.
You can also read about using filters to better tailor the experience on the official documentation.