Google trends Public Holidays Coupon Code Code Compiler

How to Auto Post on Twitter with PHP

Nov 17, 2019

Twitter provide API which we can use for auto post on twitter. So here are the demo for the use of twitter API. This is very simple process. You will have to follow only few step for using the twitter API.

first of all we have to create an account on twitter and then we have to go on twitter developer account and create a twitter app for post. This is very simple, after filled all required fields your twitter application will be ready for use. After the creation of twitter app, we will get the CONSUMER_KEY, CONSUMER_SECRET, OAUTH_SECRET keys for entering in the index file.

Now ypu can use login with twitter and get oauth access token and oauth secret key for post on twitter account.

Now we can download the SDK from the GitHub. Here is the link for download SDK

$cb = \Codebird\Codebird::getInstance();
$reply = $cb->media_upload(array(
    'media' => $image
$mediaID = $reply->media_id_string;
$params = array(
    'status' => 'MSG_FOR_TWEET',
    'media_ids' => $mediaID

Copyright 2024. All rights are reserved