There's a PEAR library called "Services_Twitter", or something like that. I've used it before and it works fine. I don't know if it supports oauth though.