Search code examples
facebookdialogsend

How to close send dialog, when finished share?


I use this method to share,

 /dialog/send?
  app_id=123456789
  &link=mylink
  &redirect_uri=theurl

I don't want the share window redirect, I just want it close, when finshed, what should I do?


Solution

  • Use the JavaScript SDK:

    FB.ui({
      method: 'send',
      link: 'your-link',
    });
    

    The Send Dialog will close automatically. Source: https://developers.facebook.com/docs/sharing/reference/send-dialog

    More information about the JS SDK: https://developers.facebook.com/docs/javascript