I've created a twitter bot that can tweet, but I don't know how to make it reply to a tweet

So here's my current flow, the twitter in node detects everytime I tweet something, it then publishes that to an MQTT server under the topic 'tweetin' where it is processed in a python code and an output is published to 'tweetout'. This output is then received and sent to a twitter out node that tweets the output. The only problem is I want to tweet it in reply to the original tweet, as opposed to just a generic tweet. In order to do this I have researched and found I may need to set my msg.params for the tweet, but I am unsure of how to do that. Any help would be greatly appreciated

Hi, I would browse through the twitter api documentation to find out what property/payload is needed to respond to a tweet, presumably identified by an id, which is certainly supplied via the response of the twitter-in. This id, or possibly several values, must then be looped in and you must orchestrate the request payload in your python script.

Hope this helps


Assuming your Tweetin could be from a variety of Twitter accounts (e.g. FromTweet), then for them to receive a Direct message from you their Twittter Privacy settings would either have to be following you to receive direct messages from you or set to receive from anyone. Your tweetout output needs to be prepended by a D and their twitter address using a Change Node.



Note the space after their Twitter address.
Of course your python code could create the suitably prepended payload message.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.