Tweeting a Javascript return



I’m trying to write a script that automatically tweets the name of every file I open with Photoshop. So far I have a script that runs a Javascript alert of the file name every time I open a file with the program, but I’m not sure where to go from here. I understand I have to connect to Oauth in some way, but I’m somewhat new to coding. Is this possible to do entirely in Javascript?