Illykai ([info]illykai) wrote,
@ 2007-08-10 17:19:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
I've decided that I'm going to get back into using LJ, but that I'm going to make my journal friends only. I'll probably get around to doing that next week. Today, however, I set my mind to working out how I can get a gadget for iGoogle to display my friends page for me as an RSS feed. These days I have iGoogle as my browser's home page. It's basically a user-customizable page that you can add little XML, HTML, and Javascript-based gadgets to. You can do things with it like, in my case, have RSS feeds for news sites that you visit every day next to your GMail inbox and your Calendar. It's a bit like Outlook if you set it all up right, but it follows you around, which is great for me since I'm sometimes at Uni and sometimes at home and I CBFed to do some strange synchronization thing. Plus it's free.

Getting your LJ friends feed onto iGoogle is actually a little bit fiddly, so I'm putting this post up in the hope that some spider will squirrel the information away for posterity.
  1. You will need a paid LJ account in order to be able to deliver your friends page as an RSS feed, so buy one first if you don't have one. 1 year costs under US$20.

  2. Make sure that the group of friends that you want to be displayed in your feed is called "Default View" and that the group is set to "Public". Doing this may cause Drama(tm) with people who care about whether they're on that view or not since their presence or absence will be readily apparent to anyone who visits your friends page. This is all done from the custom friends groups management page.

  3. Mark the S1 style #670763 as trusted. This is pretty esoteric, but AFAIK it's a style that was made by someone users a while back that formats a friends page with the appropriate RSS tags. Making it trusted puts faith in the hands of the people who created and maintained it that they won't somehow inject malicious code or break it randomly. If you're not keen to do this, then stop here. I did it because I'm a trusting and impatient fool. You can do this at the admin console, using the command: set trusted_s1 670763

  4. Go to your iGoogle home page and click the "Add Stuff" link, then the little "Add by URL" link which is hidden beside the search button on the content directory page. When it prompts you for a URL, put in http://username.livejournal.com/data/customview?styleid=670763&auth=digest, where username is your LJ user name. The styleid argument formats the output as an RSS feed as I said above. The auth part means that as long as LJ detects you as being logged in you will receive secure posts, like friends-locked posts for instance.
The end result should be that you get a little gadget with a list of headers containing the user names and subject lines of all the posts from people updating on your friends list. You can then click the little crosses next to the headers to expand the full entries within the gadget. Very neat and cool. You can also grab the feed with any RSS reader, not just the iGoogle gadgets. I've yet to mess around and find out what it takes for LJ to realize that I'm logged in and display secure posts in my feed. I'm pretty sure there's some kind of cookie wrangling going on, but I'm not entirely sure what.



(Read 7 comments) - (Post a new comment)


[info]danoot
2007-08-12 02:13 am UTC (link)
your feed aggregator isn't logged in. Your feed is also public, and anyone can read it, meaning that having the titles and some content of locked posts in it is extremely unadvisable. Yaknow?

(Reply to this) (Thread)


[info]illykai
2007-08-12 02:23 am UTC (link)
People who aren't on the friends list of users that have private posts in my feed shouldn't be able to see those private posts. AFAIK that's what the &auth=digest argument is for. Also, LJ is what is doing the feed aggregation, there is no 3rd party script.

(Reply to this) (Parent)(Thread)


[info]danoot
2007-08-12 02:29 am UTC (link)
but rss feeds aren't dynamic, in the same way an lj friends-page is. The friends page is generated independently for each user, so if I load up your friends page, I'll see private posts for locks I'm in, but not those which belong to people I don't know. But the rss feed is generated every five minutes, or whatever, then remains static, whoever accesses it gets the same one until it is updated. If it is generated as you, logged in, then it's going to show the titles of updates which are not meant to be visible to some people. I'd say auth=digest is more likely to be the part which publishes the titles and small segments of the posts, rather than any kind of authorisation thing. I could, of course, be wrong, because I haven't read any of it. But basically, your rss is not dynamic and thus shouldn't have any per-user stuff in it.

(Reply to this) (Parent)(Thread)


[info]illykai
2007-08-12 05:08 am UTC (link)
The RSS feed in this case gets built through a style in LJ, so I don't know how everything works behind the scenes exactly.

Here's what the FAQ says:
Protected Entries: When you view your RSS feed in your browser while logged into LiveJournal, you will see all your recent entries; someone who is not logged in or not on your Friends list cannot see any protected entries in the feed. Users on your Friends list can either log into LiveJournal (cookie authentication) or use HTTP Digest Auth by adding ?auth=digest to the end of the feed URL. If the URL already contains a question mark, add &auth=digest instead.

(Reply to this) (Parent)

(Reply from suspended user)

(Read 7 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…