Tutorial :Using oauth for creating twitter application in iphone



Question:

I am creating a twitter application in iphone using oauth. But my application request for:

oauth_consumer_key,  oauth_signature_method,  oauth_signature,  oauth_timestamp,  oauth_nonce,  oauth_version,  oauth_callback,  

Please anyone help me how to create all these keys for my application. In my twitter account xauth is disabled by default. So, how can I enable it in my application?


Solution:1

It's highly unlikely you need to enable xAuth. The Twitter API documentation, specifically the authentication guide explain these parameters in more detail. Also have the OAuth 1.0 spec open to refer to, even if you're using a third party library- you will save your sanity if you understand the mechanics of the token exchange.


Solution:2

You'll need to read up about OAuth. All the fields are part of the standard. Twitter will give you the first one (oauth_consumer_key), and the version number is always 1.0. (Version 2.0 is not yet complete and Twitter doesn't use it.) The others you need to calculate. Or at least find an open source library that does it for you.

As for enabling xAuth, you need to send a message to Twitter. Sounds like they're getting more and more strict about which apps they allow, though.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »