Open toddheslin opened 4 years ago
I should note that I'm loving this library and will be jumping in to contribute and send PRs soon. Thanks for publishing it!
I've noticed that in 'Setting Persistent Menu' section of the readme you have:
const result = await profileClient.setPersistentMenu(senderId, [<MENU_ENTRIES>])
and in the source code: https://github.com/crisboarna/fb-messenger-bot-api/blob/9de548c4b1462fe20bcca77fe74d542228cdebb0/src/profile/FacebookProfileAPIClient.ts#L79-L84
The call is to: 'me/messenger_profile'
'me/messenger_profile'
However, the senderId isn't passed into the messenger_profile endpoint: https://developers.facebook.com/docs/messenger-platform/reference/messenger-profile-api/persistent-menu
But it is passed into the me/custom_user_settings endpoint: https://developers.facebook.com/docs/messenger-platform/send-messages/persistent-menu#user_level_menu
me/custom_user_settings
As a slightly different issue, the composer_input_disabled field is not an option on the API as it only takes the array that is passed into call_to_actions.
composer_input_disabled
call_to_actions
Hey @toddheslin thank you for the kind words :D
Any PR is much appreciated and am looking forward to your commits.
On your points:
I should note that I'm loving this library and will be jumping in to contribute and send PRs soon. Thanks for publishing it!
I've noticed that in 'Setting Persistent Menu' section of the readme you have:
const result = await profileClient.setPersistentMenu(senderId, [<MENU_ENTRIES>])
and in the source code: https://github.com/crisboarna/fb-messenger-bot-api/blob/9de548c4b1462fe20bcca77fe74d542228cdebb0/src/profile/FacebookProfileAPIClient.ts#L79-L84
The call is to:
'me/messenger_profile'
However, the senderId isn't passed into the messenger_profile endpoint: https://developers.facebook.com/docs/messenger-platform/reference/messenger-profile-api/persistent-menu
But it is passed into the
me/custom_user_settings
endpoint: https://developers.facebook.com/docs/messenger-platform/send-messages/persistent-menu#user_level_menuAs a slightly different issue, the
composer_input_disabled
field is not an option on the API as it only takes the array that is passed intocall_to_actions
.