Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Chris Shiflett's Blog:
Twitter OAuth
Sep 17, 2010 @ 13:48:59

Chris Shiflett has a new post to his blog today about the new authentication model Twitter uses, OAuth, and how you can connect your PHP applications to their services.

I've been working on a project with my Analog friends that might use the Twitter API to streamline stuff like signup for those who already use Twitter. Because this now requires OAuth, I needed to implement OAuth quickly, so that we had something to test and consider.

He chose this Twitter library to connect his application and mentions the consumer key and consumer secret you'll nee to get from the Twitter development site. The library makes it as simple as passing these bits of information in and having the Twitter side handle it from there (a redirect to approval page). The callback URL is requested and you then have access to that user's information including name, location, URL and description.

tagged: twitter oauth authentication tutorial twitteroauth

Link:

SitePoint.com:
OAuth for PHP Twitter Apps, Part I
Sep 03, 2010 @ 15:53:45

On the SitePoint blogs today there's a new tutorial posted, the first part of a series, from Raj Deut about making the move away from the basic authorization for connecting to the Twitter API and towards their new OAuth method for Twitter Apps.

As of August 31, Twitter's HTTP Basic Authenticated API service has been disabled entirely. Now, any interface with the API will be required to use a token-based authentication method known an OAuth. [...] At first glance, the task of implementing OAuth can appear daunting, and OAuth's token exchange system can be confusing if you're unfamiliar with it. Fortunately, there are some rather clever individuals who've done the groundwork for us.

They show you how to register your application with Twitter and use the TwitterOAuth library to make a sample connection to their servers. They also show how to generate the tokens for the URL and the ones for accessing the site as a user. With tokens in hand, the script can then connect to the system and make a sample tweet (complete code included).

tagged: oauth basic authentication tutorial twitteroauth library

Link:


Trending Topics: