Sorry, I don’t know how to do it with a script, so someone else would need to guide you on that below.
However, have you tried it with Make’s Twitter v2 integrations, which is working 100% perfectly fine for all of my Airtable consulting clients — using both v2 of Twitter’s API and using the free tier of Twitter.
I just tested it right now, and it still works fine. I was able to post a tweet from Airtable to Twitter right now using Make and a free Twitter account.
Here is Make’s documentation on how to configure your Twitter API with API v2 and free accounts.
If you need to trigger a Make scenario instantly from Airtable with no delays, check out this thread.
Also, there can be a bit of a learning curve with Make, which is why I created this basic navigation video for Make, along with the links to a few other Make training resources.
p.s. If you have a budget for your project and you’d like to hire an expert Airtable consultant to help you with any of this, please feel free to contact me through my website: Airtable consulting — ScottWorld