Collections/entries/curate in python-twitter



I have been trying for quite some time to use the python library python-twitter to post multiple tweets in bulk to a collection. The API I am trying to use is collections/entries/curate.

Suppose I have the following payload:
{‘changes’: [{‘tweet_id’: ‘390897780949925889’, ‘op’: ‘add’}, {‘tweet_id’: ‘390853164611555329’, ‘op’: ‘add’}], ‘id’: ‘custom-923507804450770944’}

I understand that I need to use a POST request with this JSON in its body. I don’t know how to do this? I understand that the request has to be something similar to:

but how do I specify the body of the request? Any help please?

This is frustrating!


There’s an example of using the Collections API here using twurl. You need to set the content type of the request to application/json.

I’m not familiar with the python-twitter library unfortunately.