Log in

No account? Create an account

Previous Entry | Next Entry


Some of you have been asking me about the script I use to post my Twitter Tweets to LiveJournal ("friends"-protected entry). It's based on a pretty simple script that I created by combining two similar scripts, one by greck (birdcage.pl) and the other by maeglin73 (tweets2lj.pl). I've received permission from both of the authors to share their work, so here's the script I use: twitter2lj.pl.

Take the script, rename it to "twitter2lj.pl", replace TWITTER_USER, TWITTER_PASS, LJ_USER, and LJ_PASS with your username(s) and passwords. Set it up via cron (or some other scheduling application) to run at 23:59 each evening.

Yes, I'm running it from my Mac (which is Unix-based). Yes, it will probably run on Windows. No, I don't know how. If anyone uses this or something similar on Windows, feel free to leave a comment here so others can benefit from the knowledge.



( 15 comments — Leave a comment )
Jul. 3rd, 2007 01:09 am (UTC)
There's ActivePerl for Windows, but I don't know how to install Perl packages with it (I've only ever used the standard set for things at work). There's likely to be some way out there to schedule it to run each night.
Aug. 11th, 2007 09:49 pm (UTC)
I would seriously love to find a way to make this work on Windows, if anyone can help me.

Dec. 12th, 2007 10:30 am (UTC)
Hey, awesome, thank you for sharing.

I've modified it for my own use - I changed it to only post tweets that begin with "Lj" and to work every hour, since I wasn't so much looking for something that would collect my twitters onto LiveJournal as something that I could use to post to LiveJournal from my phone.
Dec. 12th, 2007 01:22 pm (UTC)
Glad you're enjoying it. You also might be interested in how to post to LJ from your phone directly.
Dec. 13th, 2007 12:14 am (UTC)
Thanks for the pointer. Unfortunately, my phone does not allow me to send emails (unless I connect expensively to the internet), which is why I'd been thinking about a solution like this.

(And I can't use TxtLJ either.)
Feb. 2nd, 2009 04:21 am (UTC)
Gah, has anyone found out if this can work with Windows? I've been looking for a place to put my tweets on Livejournal besides Loudtwitter because.. hey you have to admit, they suck.
Feb. 6th, 2009 01:09 pm (UTC)
I don't know how to do it in Windows. It's Perl, so if you can get Perl running on Windows, it should work with little modification.
Jul. 1st, 2009 11:01 pm (UTC)
I know how to load a perl script already since I'm already using one to post my recently played last.fm tracks on twitter, but when loading twitter2lj.pl..

Can't locate XML/RSS/Parser.pm in @INC <@INC contains: C:/Perl/site/liv C:/Perl/lib .> at C:/Documents and Settings/Joey/twitter2lj.pl line 95. BEGIN failed--compilation aborted at C:/Documents and Settings/Joey/twitter2lj.pl line 95
Jul. 1st, 2009 11:03 pm (UTC)
Looks like you don't have the needed libraries. Make sure you have XML/RSS/Parser.pm installed correctly.
Jul. 1st, 2009 11:54 pm (UTC)
How do I install it? :|
Jul. 2nd, 2009 02:13 am (UTC)
I'm not familiar with Windows and don't know how to install Perl modules there. Good luck!
Jul. 5th, 2009 01:13 pm (UTC)
More help may be available here and/or here.
Jul. 5th, 2009 08:12 am (UTC)
My perl-fu is damaged these days (by the multiple sclerosis MonSter). I am getting an error message:

natalie$ perl twitter2lj.pl
Can't locate XML/RSS/Parser.pm in @INC (@INC contains: /sw/lib/perl5 /sw/lib/perl5/darwin /Library/Perl/Updates/5.8.8 /System/Library/Perl/5.8.8/darwin-thread-multi-2level /System/Library/Perl/5.8.8 /Library/Perl/5.8.8/darwin-thread-multi-2level /Library/Perl/5.8.8 /Library/Perl /Network/Library/Perl/5.8.8/darwin-thread-multi-2level /Network/Library/Perl/5.8.8 /Network/Library/Perl /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.8 /Library/Perl/5.8.6 /Library/Perl/5.8.1 .) at twitter2lj.pl line 95.
BEGIN failed--compilation aborted at twitter2lj.pl line 95.

Any ideas what I do next? I'd love to get this working as LoudTwitter seems to have died.

Edited at 2009-07-05 08:13 am (UTC)
Jul. 5th, 2009 01:12 pm (UTC)
You probably need to install XML::RSS::Parser.
Sep. 12th, 2009 04:44 pm (UTC)
Thanks a lot for this, I got it working on Windows. It took me a lot longer than necessary since I had no previous experience with Perl, but I got it working eventually. (I managed to figure out how to install Perl and most of the necessary modules just by reading the online documentation at cpan.org. A couple of the modules gave me trouble because they had to be installed a certain way, and that was what took so long.) Windows has a built-in scheduler, so I just whipped up a tiny batch file to run the script, and set the scheduler to run the batch every night.
( 15 comments — Leave a comment )

Latest Month

June 2013
Powered by LiveJournal.com
Designed by Tiffany Chow