Is it possible to send automatic tweets from laravel like user.
User must be logged by my twitter API, and then can I send tweet as him?Of course he must accept this action. I must know when user tweets my page.
Can it work like facebook share? Is there tools for this?
Sorry for my english.
Thanks for all answer.
PS.
I do not mean this package http://vegibit.com/send-a-tweet-with-laravel/ .
I need send tweets to user table.
2
Answers
Use this https://twitteroauth.com/ package.
Push in your console
composer require abraham/twitteroauth
When all installed then you should add
use AbrahamTwitterOAuthTwitterOAuth;
to your class.Now in function you must create connection with your api.
If you created connection then you can send post as user.
For example:
I have found the ThuJohn package to be the winner at this type of work.
https://github.com/thujohn/twitter
Simple to use with various options, such as
Send a tweet realtime without media:
Send a tweet realtime with media:
You can also do various other things, such as login, You can take it an extra level and easily store the users token & secret to your users table and do scheduled posts.
Once you have stored the users token & secret you can tweet scheduled posted for them like this: