PHP script to check authenticate/ a user's twitter username
I am as开发者_运维百科king for a user's twitter name, as part of a form input. I want to be able to quickly check that the username is valid and that the user is who they say they are (i.e. they have the password and can login to twitter using the provided username).
Does anyone know how I may implement such functionality? Better still, is there a PHP script/example that shows how to cobble together something similar?
I would recommend using a library for interacting with Twitter. You can try something like Zend_Service_Twitter from the Zend Framework. Since twitter no longer accepts the basic authentication, you will need to use a solution with OAuth authentication. Most twitter PHP libraries support OAuth out of the box and will save you tons of time.
精彩评论