# Share Dialog
The Share dialog gives people the ability to publish an individual story to their timeline. This documentation describes how to implement the Share dialog on the Web. To implement the Share dialog in a mobile app, see [Sharing on iOS](https://developers.facebook.com/documentation/sharing/ios) and [Sharing on Android](https://developers.facebook.com/documentation/sharing/android).
The following is an example of the Share dialog that is sharing a link to a user's timeline.
If you are the Webmaster for a page that is shared to Facebook, include [open graph meta tags](https://developers.facebook.com/documentation/sharing/best-practices) to customize the story that is shared back to Facebook. It's important that you mark up your website with Open Graph tags to take control over how your content appears on Facebook. For more information, see [A Guide to Sharing for Webmasters](https://developers.facebook.com/documentation/sharing/webmasters).
## Share by Using URL Redirection {#redirect}
To share a link by using URL redirection, use the following code. Line breaks are included for ease of reading. Remove the line breaks when you use this code.
```
https://www.facebook.com/dialog/share?
app_id=145634995501895
&display=popup
&href=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2F
&redirect_uri=https%3A%2F%2Fdevelopers.facebook.com%2Ftools%2Fexplorer
```
## Share by Using the Facebook SDK for JavaScript {#integrating}
The Share dialog is available in the Facebook SDK for JavaScript by using the [FB.ui function](https://developers.facebook.com/documentation/javascript/reference/FB.ui) with the `share` method parameter. Use the following code snippet to open the Share dialog.
```
FB.ui({
method: 'share',
href: 'https://developers.facebook.com/docs/',
}, function(response){});
```
[Try it yourself!](http://www.fbrell.com/Sharing/2%20-%20FB.ui%20Dialogs)
## Parameters {#params}
The following are the parameters for the Share dialog.
| Parameter | Description | Required? |
| --- | --- | --- |
| `app_id` | Your app's unique identifier. | Yes. Provided automatically when you use the SDK. |
| `display` | How the Share dialog is rendered.<br><br>+ **URL Redirection** – The `display` value is `page`. The Share dialog is a full page that appears within Facebook.com.<br><br>+ **Facebook SDK for JavaScript** – The display value is one of the following:<br> - a modal `iframe` for people logged into your app<br> - `async` when using within a game on Facebook.com <br> - a `popup` window for everyone else<br><br>If necessary, you can force the `popup` type when when you use the Facebook SDK for JavaScript.<br><br>+ **Mobile Web Apps** – The `display` value is always `touch`.<br><br>+ **Facebook SDK for iOS or Android** – The SDK specifies `display` automatically and chooses an appropriate display type for the device. | Yes. Provided automatically when you use the SDK. |
| `hashtag` | A hashtag to add to the shared content. People can remove the hashtag in the Share dialog. The hashtag should include the hash symbol, for example `#facebook`. The default value is `null`. | No |
| `href` | The link to share. The default value is the current URL. | Required when you use the SDK. |
| `redirect_uri` Deprecated | The URL to redirect to after a person clicks a button on the Share dialog. | Yes. Provided automatically when you use the SDK. |
| `mobile_iframe` Deprecated | `true` to open the share dialog in an iframe on top of your website. This option is only available for mobile, not desktop | `false` |
## Response Data {#response}
A response only occurs if the user is logged into your app using Facebook Login.
| Parameter | Description |
| --- | --- |
| `error_message` | An error message. |
## See Also
- [Best Practices for Sharing](https://developers.facebook.com/documentation/sharing/best-practices)