Authenticating with Stack Overflow programmatically
I would like to add up and down voting to my iPhone application - MyStacks. for this I need the to be able to authenticate the user with Stack Overf开发者_JS百科low.
I'm look at adapting the Twitter-OAuth-iPhone library. However the problem I have is obtaining the consumer and secret key. to use OAuth, do I need to obtain a different key for each provider? In order to obtain a consumer key from Google the application needs to have a domain name, but this being an iPhone app of course I don't have one. Does this mean that I can't use OAuth?
Is there any other way to programmatically authenticate with Stack Overflow?
Found the solution, on the iPhone its surprisingly simple. Just embed a UIWebView which opens up the SO login page and then once users authenticates themselves the required cookies will be saved using NSHTTPCookieStorage so you can simply use NSURLRequest as normal.
精彩评论