Search code examples
facebookwebviewsharefacebook-messenger-bot

Facebook Messenger bot - sharing in webview not starting


I am creating a bot for Messenger that uses webview with some custom content. The webview works just fine, also closing the webview using Messenger Extensions works well. Now I need to start customized sharing flow from this webview (https://developers.facebook.com/docs/messenger-platform/webview/sharing). I call the method MessengerExtensions.beginShareFlow but nothing happens. Neither of success nor error are triggered. I understand that success would be fired after the sharing is complete, but I can't even start it, as the sharing UI does not appear at all.

I have double-checked all points listed here:
https://developers.facebook.com/docs/messenger-platform/webview/troubleshooting

What can be wrong? My bot is still not submitted for review (for obvious reasons - it is not finished yet and is missing some functionality) - is that be the problem? I would be happy to contact FB developers support directly, but I can't find a place to do it (btw: this is just hilarious).


Solution

  • In my case the problem was that I was not specifying ImageURL. The call to beginShareFlow just crashed in such case (error handler was not called).