Troubleshooting Common Webview Problems
If you're not able to call Messenger Extensions from your page, consider the following:
- When you are opening the webview from the persistent menu or a button, ensure that the
messenger_extensionsparameter is set totrue. If a user has opened the webview via a shared message, it is not required that they have talked to your bot for Messenger Extensions to work.
Check that you have whitelisted the domain the page is hosted on.
Check that the JS SDK is included on every page that uses extensions.
Make sure you are not attempting to call any functions before the SDK has finished loading. Use
window.extAsyncInitdescribed here to tell when loading is done.Make sure that the page is being served over https and does not include any non-standard port.
Extensions Error Codes
| Code | Message |
|---|---|
| This SDK method is not supported on this Messenger client. Please upgrade |
| Messenger Extensions are not enabled - could be "messenger_extensions" was not set on a url, the domain was not whitelisted or this is an outdated version of Messenger client |
| Invalid MessageContent provided to SDK API call |
| Invalid title string provided in message content |
| Invalid subtitle string provided in message content |
| Invalid image URL provided in message content |
| Invalid item URL provided in message content |
| Invalid button data provided in message content |
| URL data is missing in message content. Please provide item_url, button_url or both |
| sharingType provided in beginShareFlow call is not valid |
| Invalid attachment in begin share flow message content |
| Attachment type in message content must be set to template |
| Payload is not valid in message content attachment |
| Invalid open graph url provided in message content |
| Permission not valid to call the SDK API |
| Messenger Extensions unexpected error |
| Begin Share Param Validation Error |
| User canceled payment flow |
| Payment request cannot be processed due to missing privacy url |
| Failed to get user ID |