Facebook dialog does not close after posting or canceling

Using the v2.0 Facebook API, the sharing popup does not close after the Cancel or Publish to Facebook button has been selected. Previously, the redirect_uri parameter was passed to the Feed endpoint, and this could be used to close the window. However, trying to pass this parameter to the Share endpoint, I get the message: "When using FB.ui you should not specify redirect_uri."

Is there a way to make the popup close? And if not, could there be a problem with the API request? The link SHOULD be shared when Publish to Facebook is selected, so I don’t think it’s a problem with login or permissions.

Here's what the API call looks like:

FB.ui({
    method: 'share',
    href: location.href,
)}, function(response){});
+4
source share

All Articles