Skip to content Prejsť na obsah


How to post to Twitter from the Linux command line Ako písať na Twitter z príkazového riadka Linuxu

Linux

Twitter has become a big part the online lives of a lot of people in the recent months. Twitter sa stala veľká časť on-line život veľa ľudí v posledných mesiacoch. 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. Aj keď v sebe cvrlikání je veľmi jednoduchá služba, ktorá umožňuje ľahké takmer všetci ho mohli používať, je dodávaný s API, ktoré pomohlo ľuďom port to takmer všetky platformy. Twitter has been ported to web browsers, to cellphones, and apparently even Twitter bol portován na webových prehliadačov, na mobily, a zrejme aj washing machines práčky haven't been spared. neboli ušetrené. The Linux command line has always been a favorite of geeks. Linux príkazového riadku bolo vždy obľúbenou geeks. Here's a trick that's great fun, and could be useful if required. Tu je trik, je to veľká zábava, a mohla by byť užitočné v prípade potreby.

Let's see how to post an update to your Twitter account right from the Linux command line. Pozrime sa, ako sa po aktualizácii na pravej strane účtu rozechvění z príkazového riadka Linuxu. This will also work on the MacOS X command line. To bude tiež pracovať na MacOS X príkazového riadka. 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. Zadajte nasledujúci príkaz v termináli, rozhrania, nahradí užívateľské meno a heslo k svojmu účtu poverenia rozechvění, a status = "tweeting z príkazového riadku Linuxu" s vlastnou správou.

# curl -u username:password -d status="Tweeting from the Linux command line" http://twitter.com/statuses/update.xml > /dev/null # Curl-u meno_používateľa: heslo-d status = "tweeting z príkazového riadku Linuxu" 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: Takže ak vaše meno je Twitter fuzzycat17 a ste heslo fur123ball vyššie príkaz bude vyzerať nasledovne:

# curl -u fuzzycat17:fur123ball -d status="Tweeting from the Linux command line" http://twitter.com/statuses/update.xml > /dev/null # Curl-u fuzzycat17: fur123ball-d status = "tweeting z príkazového riadku Linuxu" 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 Spustením tohto príkazu bude mať za následok nové pípanie za vyslaných z vášho účtu, ktoré obsahujú slová tweeting z príkazového riadka Linuxu

Now go check your Twitter home page to see if the Tweet was posted correctly. A teraz choď skontrolovať svoje cvrlikání domovskú stránku a zistite, či pípanie bol vyslaný správne.

As I said, this trick could be completely for geekish fun, or could be put to good use. Ako som povedal, mohlo by to byť úplne trik Geekish pre zábavu, alebo by mohol byť dobre využiť. You could integrate this command into shell script to notify you of something. Dalo by sa začleniť tento príkaz do skript, aby sme vás upozornili na niečo.

Happy Tweeting. Happy tweeting.

Posted in Publikované v Linux Linux . .

Related Posts: Súvisiace zmeny:

How to enable the root user account in Ubuntu Linux Ako povoliť konto užívateľa root v Ubuntu Linux
Some useful Linux bash tricks Niektoré užitočné triky Linux bash
How to determine which of your tweets have been favorited, and by whom Ako určiť, ktoré z vašich obľúbených tweets boli, a kým
How to find your public IP address with the Linux command line Ako nájsť svoju verejnú IP adresu s príkazového riadka Linuxu
How to set the date on your Linux machine Ako nastaviť dátum na počítači Linux

3 Responses 3 Odpovede

Stay in touch with the conversation, subscribe to the Zostať v kontakte s konverzácia, prihláste sa RSS feed for comments on this post RSS kanál pre komentáre k tomuto príspevku . .

  1. wock says wock hovorí

    Its cool tips, thx. Jej chladné tipy, thx. How to make a script that implements these steps? Ako urobiť skript, ktorý vykonáva tieto kroky?

  2. Jon Payne Jon Payne says hovorí

    Can I assume that aa direct message or @ reply would simply be added to the sent string? Môžem predpokladať, že aa priame správy alebo @ reply by byť jednoducho pridané poslal reťazec? For example curl -u fuzzycat17:fur123ball -d status=”@somename Tweeting from the Linux command line” Napríklad curl-u fuzzycat17: fur123ball-d status = "@ somename tweeting z príkazového riadku Linuxu" http://twitter.com/statuses/update.xml http://twitter.com/statuses/update.xml > /dev/null; or status=”d somename . > / Dev / null; alebo status = "d somename. . . . . "

    True? Je to pravda?

Continuing the Discussion Pokračovanie Diskusia

  1. Tweet from the command line « Linux & Stuff Pípanie z príkazového riadku "Linux & Stuff linked to this post on May 6, 2009 súvisiacich s touto poštou na 6.května 2009

    [...] in CLI, twitter Nice little trick from Simple Help. [...] V CLI, cvrlikání Nice malý trik od Simple pomocníka. I tried this and it works perfectly. Zkoušel jsem to a funguje to perfektne. Only problem is there's nothing to tell you you gone [...] Jediný problém je, že sa nič povedať vám už [...]



Some HTML is OK Niektoré HTML je v poriadku

or, reply to this post via alebo odpovede na tento príspevok prostredníctvom trackback Trackback . .