Twitter with Curl

Source: Internet
Author: User

Here's the thing: I have a shell script on the Raspberry Pi that gets the public address through http://ip.3322.net and logs it on the local disk (just to see if the address the telecom gave me would be repeated). Then the last few days, see if you can make this file cloud, both convenient backup, and convenient for me to telnet. So find Baidu Cloud solution, but online about Baidu cloud disk data is too old, simply not feasible. So think of the way to automatically send a tweet on Twitter to achieve this, so there is the following things.

First I searched the internet for tweets using curl as a command-line tweet, but most of the articles were old, and the solution was almost like the following, but unfortunately, not successful:

Curl--basic--user $username: $password--data "status=I m twittering with curl! " http://twitter.com/statuses/update.xml

On the other hand, the direct user name and password when the clear-text parameter is not a low point, Twitter should have some of the advanced point of the way. So, found Dean Chen's article (http://blog.csdn.net/csfreebird/article/details/18238465), and then found the post statuses/update (https:// Dev.twitter.com/rest/reference/post/statuses/update), this API is used to tweet the article. The next step is:

1. Create a new app in https://apps.twitter.com/

2. On the Https://dev.twitter.com/rest/reference/post/statuses/update page, under OAuth Signature generator Click on the app you just created.

3. Copy the generated code to the command line and enter to create a tweet.

Twitter with Curl

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.