开发者

CallBack not working on Galaxy Tab, but does work on all other devices

I'm testing my app out on my brand new Galaxy Tab and I encountered something strange.

I have Twitter integration in my app. What it basically does is open a WebView and use Oauth to autheticate. After that it sends a CallBack back to my app with t开发者_如何学Pythonhe secret token and there I use it for tweeting purposes. You can get more info about how I do this here: CallBack after Twitter authentication

This workes on all devices, but on the Galaxy Tab it doesn't go back to my app. In stead, it gives me the "Web page not available" page in the browser with the correct CallBack URL in the adresbar.

How come it doesn't work on the Galaxy Tab?

EDIT:

Could it be because the Galaxy Tab use their own browser that doesn't support CallBack?


I'm a little surprised it works on any device... the callback is sent as the response to a normal HTTP request, i.e. a 302 redirect. This is not the same thing as a user click... I don't see that you can ever rely on the browser firing an Intent for a redirect.

Unless you quickly find a workaround I strongly suggest switching to XAuth. It's a far better fit for mobile apps. Twitter's OAuth flow assumed a PC web browser every step of the way, which is always a horrible user experience on a mobile platform.


The twitter library works by inspecting the links which are being open in the webbrowser. One easiest way to check would be Place a breakpoint the code which implements the WebViewClient. If the break point hits on the function onLoadResource then there is some other bug or else what you are thinking is correct.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜