Jeremy (jeremysmith) wrote in lj_dev,

Snatching a userpic

I'm not sure if this is the right place to ask this, but I'll give it a try. Note: this IS about Livejournal in specific, NOT about OpenID as it might seem at first.

I've just added OpenID support to my website. I have a place for gravatars in my comment list, and I thought it might be cool if, when an LJ user posts a comment using OpenID, it would display their default userpic instead of a gravatar.

So, what I'm currently doing is using CURL to grab and parse it to extract their default userpic. This is obviously inefficient for both me and LJ (since I'm grabbing that whole page every time, instead of just getting a URL for a userpic) so what I'd like to ask is if there's a simpler way to get the URL to a user's default userpic.

If you want to see what I'm talking about, click here. Haven't gotten it to look quite right in I.E.; cut me some slack :-)

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded