desmondmorris / node-twitter

Client library for the Twitter REST and Streaming API's.
https://www.npmjs.com/package/twitter
MIT License
1.27k stars 237 forks source link

Square brackets misinterpreted in post params? #335

Closed trey-k closed 4 years ago

trey-k commented 4 years ago

I have something set up like below but no matter what you do I get an unhandled error that says nothing specific about an [object Array]. If you remove the brackets from the string it works fine, escaping them doesn't seem to help, any ideas?

const params = {
  name: '[🔴 LIVE] name',
  description: 'new bio'
}

client.post('account/update_profile', params) {
  .then(function (data) {
    //do whatever
  })
  .catch(function (error) {
    throw error
  })