Feed Dialog

You can add the feed dialog to your app so people can publish individual stories to their timeline. This includes captions that your app manages and a personal comment from the person sharing the content.

Sharing stories via feed dialog does not require asking for any extended permissions.

Integration

This dialog can be used with the JavaScript, iOS, and Android SDKs, and by performing a full redirect to a URL. Here are some example code snippets that can be used to trigger this dialog.

JavaScript SDK

To trigger a Feed Dialog call the function FB.ui and use the value feed for the method parameter.

FB.ui({
  method: 'feed',
  link: 'https://developers.facebook.com/docs/',
  caption: 'An example caption',
}, function(response){});

iOS SDK

Read our iOS Share Dialog guide which also allows you to publish Open Graph stories.

Android SDK

Read about our Android Share Dialog which also allows you to publish Open Graph stories.

URL Redirection

https://www.facebook.com/dialog/feed?
  app_id=145634995501895
  &display=popup&caption=An%20example%20caption 
  &link=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2F
  &redirect_uri=https://developers.facebook.com/tools/explorer

Note

If a person has the "Who can post on your timeline?" setting set to "Only me" and another person tries to make a post to the first person's timeline using the Feed dialog, it will display a "Cannot post" error.

Parameters

Note: If your app share links to the iTunes or Google Play stores, or to a Facebook profile or page, we do not post any images or descriptions that you specify in the share with the parameters below. Instead we post some app information we scrape from the app store or Facebook page directly with the Webcrawler. This may not include images. To preview a link share to iTunes or Google Play, enter your URL into the Sharing Debugger.

Parameter Description

app_id

Your app's unique identifier. Required.

redirect_uri

The URL to redirect to after a person clicks a button on the dialog. Required when using URL redirection.

display

Determines how the dialog is rendered.

  • If you are using the URL redirect dialog implementation, then this will be a full page display, shown within Facebook.com. This display type is called page.
  • If you are using one of our iOS or Android SDKs to invoke the dialog, this is automatically specified and chooses an appropriate display type for the device.
  • If you are using the JavaScript SDK, this will default to a modal iframe type for people logged into your app or async when using within a game on Facebook.com, and a popup window for everyone else. You can also force the popup or page types when using the JavaScript SDK, if necessary.
  • Mobile web apps will always default to the touch display type.

from

The ID of the person posting the message. If this is unspecified, it defaults to the current person. If specified, it must be the ID of the person or of a page that the person administers.

to

The ID of the profile that this story will be published to. If this is unspecified, it defaults to the value of from. The ID must be a friend who also uses your app.

link

The link attached to this post. With the Feed Dialog, people can also share plain text status updates with no content from your app; just leave the link parameter empty.

picture

The URL of a picture attached to this post. The picture must be at least 200px by 200px. See our documentation on sharing best practices for more information on sizes.

source

The URL of a media file (either SWF or MP3) attached to this post. If SWF, you must also specify picture to provide a thumbnail for the video.

name

The name of the link attachment.

caption

The caption of the link (appears beneath the link name). If not specified, this field is automatically populated with the URL of the link.

description

The description of the link (appears beneath the link caption). If not specified, this field is automatically populated by information scraped from the link, typically the title of the page.

ref

This argument is a comma-separated list, consisting of at most 5 distinct items, each of length at least 1 and at most 15 characters drawn from the set '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_'. Each category is used in Facebook Insights to help you measure the performance of different types of post


Response Data

Parameter Description

post_id

The ID of the posted story, if the person chose to publish to their timeline.

The parameter post_id is in a 6 month deprecation window for use without publish_actions permission. Beginning October 12, 2016, post_id requires your app to have publish_actions granted, and for the user to share to their timeline or a group.


Deprecated Parameters

As of July 17, 2015, the following parameters will be ignored. They will not be displayed either in the dialog or in the story that gets rendered on Facebook.

Parameter Description

properties

A JSON object of key/value pairs which will appear in the stream attachment beneath the description, with each property on its own line. Keys must be strings, and values can be either strings or JSON objects with the keys text and href.

actions

A JSON array containing a single object describing the action link which will appear next to the 'Comment' and 'Like' link under posts. The contained object must have the keys name and link.