Skip to content Skip to content


How to post to Twitter from the Linux command line Kā izlikt čivināt no Linux komandrindas

Linux

Twitter has become a big part the online lives of a lot of people in the recent months. Twitter ir kļuvusi par lielu daļu online dzīvi daudz cilvēku pēdējo mēnešu laikā. Although in itself Twitter is a pretty simple service, which makes it easy for just about everyone to use it, it ships with an API which has helped people port it to just about every platform. Kaut arī pati par sevi čivināšana ir diezgan vienkāršs pakalpojums, kas ļauj viegli tikai par visiem to izmantot, tā kuģiem ar API, kas ir palīdzējis cilvēkiem osta tā, lai tikai par katru platformu. Twitter has been ported to web browsers, to cellphones, and apparently even Twitter ir pārnests uz Web pārlūkprogrammās, lai mobilo telefonu, un, acīmredzot, pat washing machines veļas mašīnas haven't been spared. nav izņēmums. The Linux command line has always been a favorite of geeks. Linux komandrindas vienmēr ir bijusi izlasei Geeks. Here's a trick that's great fun, and could be useful if required. Šeit ir triks, ka ir ļoti jautri, un tas varētu būt noderīgi, ja nepieciešams.

Let's see how to post an update to your Twitter account right from the Linux command line. Let's redzēt, kā ievietot atjauninājums jūsu čivināt kontu tiesības no Linux komandrindu. This will also work on the MacOS X command line. Šis strādās arī Mac OS X komandrinda. Enter the following command in your terminal interface, replacing username and password with your Twitter account credentials, and status="Tweeting from the Linux command line" with your own message. Ievadiet šādu komandu jūsu gala interfeiss, kas aizstāj lietotājvārdu un paroli ar savu čivināt kontu pilnvaras un statusu = "Tweeting no Linux komandrindas" ar savu ziņojumu.

# curl -u username:password -d status="Tweeting from the Linux command line" http://twitter.com/statuses/update.xml > /dev/null # Cirtot-u username: password-d status = "Tweeting no Linux komandrindas" http://twitter.com/statuses/update.xml> / dev / null

So if your Twitter username is fuzzycat17 and you password is fur123ball the above command will look like this: Tātad, ja jūsu čivināt lietotājvārds ir fuzzycat17 un jūs parole fur123ball iepriekš minēto komandu izskatīsies šādi:

# curl -u fuzzycat17:fur123ball -d status="Tweeting from the Linux command line" http://twitter.com/statuses/update.xml > /dev/null # Cirtot-u fuzzycat17: fur123ball-d status = "Tweeting no Linux komandrindas" http://twitter.com/statuses/update.xml> / dev / null

Running this command will result in a new Tweet being posted from your account containing the words Tweeting from the Linux command line Running šo komandu novedīs jaunu Tweet tiek norīkoti no Jūsu konta, kas satur Tweeting vārdus no Linux komandrindas

Now go check your Twitter home page to see if the Tweet was posted correctly. Tagad pārbaudiet jūsu čivināt mājas lapu, lai redzētu, vai čivināt izlikšanas pareizi.

As I said, this trick could be completely for geekish fun, or could be put to good use. Kā jau teicu, šis triks varētu būt pilnīgi par geekish jautri, vai varētu veiksmīgi izmantot. You could integrate this command into shell script to notify you of something. Jūs varētu integrēt šo komandu ar čaumalu skriptu informēsim jūs par kaut ko.

Happy Tweeting. Happy Tweeting.

Posted in Posted in Linux Linux . .

Get Simple Help tutorials just like this one in your email inbox every day - for free! Get Simple Palīdzība konsultācijas tāpat kā šo vienu savā e-pastā ik dienas - bez maksas! Just enter your email address below: Vienkārši ievadiet savu e-pasta adresi:

You can always opt out of this email subscription at any time. Jūs vienmēr varat atteikties no šīs e-pasta abonementu jebkurā laikā.

3 Responses 3 Atbildes

Stay in touch with the conversation, subscribe to the Uzturēt kontaktus ar sarunu, abonēt RSS feed for comments on this post RSS barību komentārus par šo ziņu . .

  1. wock says wock saka

    Its cool tips, thx. To cool padomus, thx. How to make a script that implements these steps? Kā veikt skriptu, kas izpilda šīs darbības?

  2. Jon Payne Jon Payne says saka

    Can I assume that aa direct message or @ reply would simply be added to the sent string? Vai es pieņemu, ka aa tiešu ziņu vai @ atbilde būtu vienkārši pievienot nosūtīts string? For example curl -u fuzzycat17:fur123ball -d status=”@somename Tweeting from the Linux command line” Piemēram cirtot-u fuzzycat17: fur123ball-d status = "@ somename Tweeting no Linux komandrindas" http://twitter.com/statuses/update.xml http://twitter.com/statuses/update.xml > /dev/null; or status=”d somename . > / Dev / null; vai status = "d somename. . . . . "

    True? Taisnība?

Continuing the Discussion Turpinot iztirzājumu

  1. Tweet from the command line « Linux & Stuff Čivināt no komandrindas "Linux & Stuff linked to this post on May 6, 2009 saistībā ar šo amatu 2009 May 6,

    [...] in CLI, twitter Nice little trick from Simple Help. [...] Ar CLI, čivināt Nice maz triks no vienkāršiem Palīdzība. I tried this and it works perfectly. Es mēģināju šo un tas strādā perfekti. Only problem is there's nothing to tell you you gone [...] Vienīgā problēma ir tur nekas jums pastāstīt jums aizgāja [...]



Some HTML is OK Daži HTML ir OK

or, reply to this post via vai, atbildot uz šo ziņu izmantojot trackback Trackback . .