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

Could not add tweet in the collection #286

Open lucypoly opened 6 years ago

lucypoly commented 6 years ago

I am trying to use collections/entries/curate endpoint to add new tweet to the collection. I tried `const params = {id: 'custom-978631851660234753', changes: [{op: 'add', tweet_id: '978624007787311105'}]};

router.post('/', (req, res) => { client.post('collections/entries/curate', params, function (error, collection, response) { res.send(collection); }); }); But it returns { "code": 32, "message": "Could not authenticate you." }`

Also when I am trying to get the collection (id = custom-978631851660234753) router.get('/:id', (req, res) => { client.post('collections/entries', {id: req.params.id}, function (error, collection, response) { res.send(collection); }); }); I receive

{ "code": 86, "message": "This method requires a GET or HEAD." } ]

Note! search/tweets works fine

peterpme commented 6 years ago

@lucypoly https://github.com/Preposterous/twitter-lite open up an issue here if you're having trouble