Multiple Twitter Accounts Post In PHP

Multiple Twitter Accounts Post: Today we are going to create a project so that we can post multiple twitter accounts in a single click. We know twitter is a microblogging site, it's most popular social community also. Nowadays, most of the internet marketers promote their stuff in twitter. So twitter is most important and a big part of social media marketing. In our project, we make twitter sharing easier.

How to Multiple Twitter Accounts Post?

We use Codebird  API library and Twitter App  and PHP functions for make this project.

How to Multiple Twitter Accounts In PHP?

Yes, now we are on the way to create this project finally. Follow these steps step to step. Create a PHP file name as tweet.php and include this codebird library into this file. Write down this code,

function tweet($message,$media,$cusomerkey,$cusomersecrate,$token,$tokenSecret)
\Codebird\Codebird::setConsumerKey($cusomerkey, $cusomersecrate);
$cb = \Codebird\Codebird::getInstance();
$cb->setToken($token, $tokenSecret);

$params = array(
'status' => "$message",
'media[]' => "$media"
$reply = $cb->statuses_updateWithMedia($params);
return $reply;
$time = $_SESSION['time'];
$perm = $time+120;
if (isset($_POST['message'])&&isset($_POST['media']))
echo 'Flood limit';
$message = $_POST['message'];
$media = $_POST['media'];
$_SESSION['time']= time();
echo 'Shred Successfully!';
echo '<form method="post">';
echo '<b>Message:</b><br/><textarea name="message"></textarea><br/>';
echo '<b>Image Link:</b><br/><input name="media"><br/>';
echo '<input type="submit" value="Share">';
echo '</form>';
Now you need to create twitter Application. After creating a twitter application you will get a customer key and customer secret. Then you need to create twitter access token and set them into this script to config it.
Twitter Application
I have added only three accounts to config. If you want you can add more account as you like. After complete config then run this script on your server then you will get a form if everything will good. Then you will get two input box one for input message and another for input media link. Fill them with your message and image link and click on share button.
Multiple Twitter Accounts Post In PHP Tweet
After completing this you will get a success message. Now check your accounts. Your tweet would be share in all of your accounts. That's all, we have created this project successfully.

I hope Multiple Twitter Accounts Post help you to make twitter platform easy. If you have any question or comment about this Multiple Twitter Accounts Post please don't hesitate to do that, please comment your question in comment section.

Sajjad Hossain
Hi, I'm Sajjad Hossain, a PHP Developer working on PHP Development since 2012. If you have a project that you want to start you can contact me. I'm currently available for freelance work. Ping me on Facebook, WhatsApp or Skype.

We use cookies on our website. To find out more about how and why they are used or opt-out, please read our Cookie Policy. By choosing "I Accept", you consent to our use of cookies. Cookie Policy