CodeNewbie Community 🌱

Discussion on: Text Box-> Get Posted

Collapse
 
jatin profile image
JatinBhargava

Oh no no!! I used # just as a slang not like # + "text". I just want a text box then when someone writes something in it it's gets posted as we do in write a post after click it gets posted. Down under means like in facebook.

Collapse
 
michaelcurrin profile image
Michael Currin • Edited

It is easy to make a button that takes the user to Twitter with a prefilled message. As I discussed and Twitter docs recommend

developer.twitter.com/en/docs/twit...

If you want more control (like the user doesn't leave your app, or they upload an image) it gets a lot more complicated.

You need to make a dev application from your twitter profile which can take a few days michaelcurrin.github.io/python-twi...

And it is not safe to use your Twitter credentials in a frontend app because of abuse so then you need an API Node server or Lambda (ie something not running on the browser) so you can tweet on behalf of the user while keeping your secrets secret.

If you only have a frontend React app with no Node server, then the effort to set up one just to Tweet for people may not be worthwhile.