I am trying to open twitter integration inside a custom webview beacuse,
I am using this example
ctx.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(authUrl)));
If I user above code, it give a problem on pressback button. After redirection and posting status. When I press back button it goes to browser not to my application. I decide to user custom webview 开发者_运维百科to avoide this by handling back event.
I am using following example. But now after authuntication browser not redirecting me back to my application but give an error, that page not found.? Can anyone help?
I finally modify my CustomeWebView class method to check if the redirecting URL is start with "----" then parse tokens from URL and finish this activity and start new activity.
I am also find some good examples to use twitter in android
https://github.com/brione/Brion-Learns-OAuth
https://github.com/marakana/OAuthDemo
http://automateddeveloper.blogspot.com/2011/06/android-twitter-oauth-authentication.html
精彩评论