Auto post on Twitter with PHP - Twitter API

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

How to use twitter API for auto posting on twitter wall?

Create twitter APP:-  

First of all we have to create an account on twitter and then we have to go on twitter developer website (https://dev.twitter.com/apps) and sign in twitter account. After that we will go to create for twitter app. Press "create new application link on twitter developer website  and create a new twitter app. 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.



Create twitter access token:-

After successfully creation of twitter app. Now we will have to go twitter access token, that will use for twitter login and posting. This is very simple, there will be a button for create access token press on that button then you get your access token. Copy that code, this code will enter on the place of OAUTH_TOKEN in the index file.

Download PHP library or PHP API from GitHub:-

Now we will go to for download the php library or PHP API from the GitHub website. Here is the link for download PHP library (https://github.com/jublo/codebird-php) where we can download the php library.

Setup of PHP API and Index.php file:-

Finally all these step has been completed. Now we will have to setup of twitter API and create a new index.php file on the outside of the twitter API folders and put  the CONSUMER_KEY, CONSUMER_SECRET, OAUTH_TOKEN, OAUTH_SECRET in the PHP API code which we got from php app. Now there is one question that is where does we get the code of index file, for the code of index file you can go here ( http://www.tech-faq.com/send-tweets-to-your-twitter-account-via-php.html ), here you will find the index.php file code, copy that code and paste it on index file. Now enter all the keys and twitter access token in index.php file.
After that please run the index.php file and you will get the result on twitter wall.

$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, OAUTH_TOKEN, OAUTH_SECRET);

this is the line of code where you will have to enter the access token and all the secret key. After all setup when you hit the twitter API output then it will work and post automatically on your twitter wall ( which you have loged in ). You can test it also on localhost by using any free local-server like xamp or wamp. There is no other different process for localhost, this is a common process.

Also Read - How to Trend on Twitter Quickly

14 comments:

  1. I have you bookmarked your site to look at the new stuff you post.
    Buy Bulk Twitter accounts

    ReplyDelete
    Replies
    1. I have read your article, it is very informative and helpful for me.I admire the valuable information you offer in your articles. Thanks for posting it.
      Tangki Panel

      Delete
  2. Thanks a lot for your positive feedback.

    ReplyDelete
  3. Auto post on twitter with the help of php API explained in very attractive way thanks to share stuff like this hope you share lot of stuffs like this in future.
    Buy Bulk PVA accounts

    ReplyDelete
  4. I am impressed. I don't think Ive met anyone who knows as much about this subject as you do. You are truly well informed and very intelligent. You wrote something that people could understand and made the subject intriguing for everyone. Really, great blog you have got here. auto repair Manalapan NJ

    ReplyDelete
  5. I have gone through your post and I found it very helpful. Looking forward to seeing more post from you.
    Buy gmail accounts

    ReplyDelete
  6. You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers. auto message sender

    ReplyDelete
  7. Very nice post here and thanks for it .I always like and such a super contents of these post.
    phone verified gmail accounts

    ReplyDelete
  8. Great article with an excellent idea!Thank you for such a valuable article. I really appreciate for this great information.
    <a href="https://bulkacounts.com/instagram/instagram-pva-accounts/>Instagram pva accounts </a>

    ReplyDelete
    Replies
    1. Great article with an excellent idea!Thank you for such a valuable article. I really appreciate for this great information.
      Instagram pva accounts

      Delete
  9. The keen PHP software engineers keep the web application secure by never believing the information presented by clients. They generally check, channel and sterilize all client data to shield the application from differing security dangers.Why use Laravel

    ReplyDelete
  10. One of the most interesting things about Albania is its history. Visit the house of leaves in Tirana and learn more about the dictatorship era of the country Albania History

    ReplyDelete
  11. Rafting in Osum river in Albania is a wild experience. The beauty of its canyon will make it an unforgettable experience Albanian Art

    ReplyDelete
  12. Solicitation that your staff put themselves on LinkedIn. It may sound insane since numerous individuals see LinkedIn as an occupation board, however it is a decent method for recovering different backlinks to your site which will enable you to rank in web crawlers. go now

    ReplyDelete