Publishing Feed Stories to Facebook

From Facebook Developer Wiki

Jump to: navigation, search

One of the major features of Facebook Connect is the ability for your site to publish stories to your users' Facebook streams (Wall and News Feed). These stories describe some activity the users took on your site.

Contents

Benefits

The benefits of publishing Feed stories on Facebook on behalf of your site's users are twofold. Publishing stories gets you:

  • Distribution via Facebook: The actions your users take on your site can be reported on Facebook, where all of the user's friends can see it. The average user has over 120 friends.
  • Increased user engagement: An average of five users follow a link in a Feed story back to your site.

How It Works

For Facebook Connect sites, you can publish to Facebook in one of two ways:

  1. Via a Feed form, a special popup dialog that you can pop up when a user clicks to share some content, or immediately after the user takes the action on your site. This dialog gives the user the opportunity to publish the story his or her profile. Feed forms work whether or not the user has connected to your site.
  2. Automatically (without user intervention), as long as the user grants your site permission.

Publishing Via Feed Form

The user visits your site and decides to share some activity taken on your site back on Facebook. Here, the user chooses to Post on Facebook.

Your site prompts the user to confirm publishing the story. A Feed form dialog appears. The user can add a personal comment before publishing the story.


After the user click Publish, the Feed form closes. The next time the user visits his or her profile, the story appears on the Wall, and also in the user's stream for all the user's friends to see.


Publishing Directly to the User's Stream

If your user has previously granted your site the extended permission called publish_stream, your site can publish story to that user's stream automatically. A Feed form does not appear.

Here, the user has installed Facebook for Adobe AIR, a Facebook Connect desktop application. When the user connected with the application, the application prompted the user to grant the publish_stream permission.


After the user grants the permission, anytime the user updates his or her status in Facebook for Adobe AIR, the application updates the user's status on Facebook, with the post appearing on the user's profile and in the user's stream.


Here the user is updating his status with Facebook for Adobe AIR.


Because the user granted Facebook for Adobe AIR the publish_stream extended permission, the status update automatically gets posted to the user's profile, without needing to prompt the user with a Feed form.

To learn about publishing directly to Facebook Pages, please see Integrating with Facebook Pages.

Implementation

To see how this is done, read Implementing Feed Publishing from your Website or Application.

Best Practices

You should consider the following best practices when publishing back to Facebook.

Feed Forms Vs Direct Publishing

Generally, it's better to use Feed forms instead of publishing directly to a user's profile, since Feed forms provide users with the most control over what gets posted to their profiles. In general, users choose to publish over 70% of what they see in Feed Forms.

Publishing directly to the profile using the FB.Connect.streamPublish method is intended to be used in cases where Feed forms are not available or do not make sense in the natural workflow.

You can read more information on when to use direct publishing. Even in the cases, we encourage you to make it clear that the user is publishing to Facebook, and always give the user an option to opt out at the point of the action, or via a settings feature on your site.

When to Prompt for the publish_stream Permission

If you intend to publish directly to a user's profile instead of using a Feed form, you should prompt for the extended permission the first time the user chooses to publish something from your site, rather than prompting the user when the user first connects to your site.

Reference