Charca / bootbot

Facebook Messenger Bot Framework for Node.js
MIT License
974 stars 253 forks source link

Added greeting objectname in setGreetingText #71

Closed mdevalk closed 6 years ago

mdevalk commented 7 years ago

bot.setGreetingText didn't work for me. According to the messenger profile API docs objectkey "greeting" is required for the array.

mraaroncruz commented 7 years ago

@mdevalk Did you get an error or were you just looking at the source code?

These things are now equivalent in JavaScript:

const greeting = "HI THERE";
return { greeting: greeting };
// or return {"greeting": greeting}
const greeting = "HI THERE";
return { greeting };

See https://javascript.info/object#property-value-shorthand

mdevalk commented 7 years ago

mraaroncruz I did not get an error but it did not seem to work. It might take some time before the greeting is updated on the fb side, I will restest. Thanks for the input on property value shorthand, very useful.

LeartS commented 6 years ago

I can confirm that it seems like it takes some time / retries for the greeting text to be updated and visible. In my experience the same goes for the getStarted button.

mraaroncruz commented 6 years ago

Closing due to inactivity