You can add the Feed Dialog to your app so people can publish individual stories with comments to their timeline.
Sharing stories via feed dialog does not require asking for any extended permissions.
This dialog can be used with the Facebook SDKs for JavaScript, iOS, and Android, and by performing a full redirect to a URL. Here are some example code snippets that can be used to trigger this dialog.
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/' }, function(response){});
Read our iOS Share Dialog guide which also allows you to publish Open Graph stories.
Read about our Android Share Dialog which also allows you to publish Open Graph stories.
https://www.facebook.com/dialog/feed? app_id=145634995501895 &display=popup &link=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2F &redirect_uri=https://developers.facebook.com/tools/explorer
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.
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 |
---|---|
| Your app's unique identifier. Required. |
| The URL to redirect to after a person clicks a button on the dialog. Required when using URL redirection. |
| Determines how the dialog is rendered.
|
| 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. |
| The ID of the profile that this story will be published to. If this is unspecified, it defaults to the value of |
| The link attached to this post. |
| The URL of a media file (either SWF or MP3) attached to this post. If SWF, you must also specify |
| 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 |
Parameter | Description |
---|---|
| The ID of the posted story, if the person chose to publish to their timeline. |
| 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 |
| 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 |
| 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. |
| The name of the link attachment. |
| The caption of the link (appears beneath the link name). If not specified, this field is automatically populated with the URL of the link. |
| 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. |
| The local image file uploaded, |