Code
Code

Reputation: 6251

What is redirect_url for the share dialog?

When I create a share dialog to share www.example.com using this link:

https://www.facebook.com/dialog/share?app_id=[myappid]&display=popup&href=https%3A%2F%2Fwww.example.com

I get the error "The parameter redirect_uri is required". What is this parameter for? The documentation states "The URL to redirect to after a person clicks a button on the dialog. Required when using URL redirection.".

Docs: https://developers.facebook.com/docs/sharing/reference/share-dialog

Upvotes: 1

Views: 623

Answers (1)

andyrandy
andyrandy

Reputation: 73984

The redirect_uri is for using the dialog as URL, not as a popup (which you are trying to do, i assume). If you don't want to redirect, use the FB.ui dialog - the code is on the same page in the docs.

You can also use the sharer.php instead:

https://www.facebook.com/sharer/sharer.php?u=[your-url]

Upvotes: 2

Related Questions