Implementing MPOAuth in iPhone app
I have been all around the web trying to find resources on how to use MPOAuthMobile framework, to integrate OAuth to my iPhone app.
Th wiki here: http://code.google.com/p/mpoauthconnection/wiki/MPOAuthMobile says nothing about the configuration. I compiled the sample and added my endpoints to the oauthAutoConfig.plist and RootViewController. The requestToken goes fine and a unauthorized token is returned from my server.
The next thing is the framework opens the user access request to a page in Safari, not in a UIWebView as the wiki says.
Even after successfull login (via the web form) the v开发者_Python百科erification code is posted back to the browser.
The framework never requests the accessToken.
There is a lot of code (that looks like it can do everything automatically) but i cant figure out how to configure the framework.
My initial goal is to pop the UIWebView to the user with the login form and after tapieng "login" the framework/app should pick up the accessToken it self.
Can anybody help for make MPOAuthMobile work? Has anybosy had any success with the full flow?
Kind regards Esben
to make your app respond to the custom x-com-mpoauth-mobile://success
make sure you have declared it in your Info.plist as follows:
Then implement -(BOOL)application:handleOpenURL:
in your App Delegate and Safari should pass control back to the app when it gets the access token.
精彩评论