question

peterturborilla avatar image
peterturborilla asked

Twitter web view login with Unity & Prime31 Social Networking Plugin

Hi, We have a problem with the web view on Kindle Fire when trying to log in with Twitter using Prime31's Social Networking Plugin for Unity. The support at Prime31 asked us to report this problem directly to Amazon, saying: "it sounds like when the forked the Android WebView class they added a bug". Here's the original question from Prime31's forum: We're using the latest social networking combo plugin (2014-06-27) to login to Facebook and Twitter on iOS and Android. It works great on all devices (iOS and phones with Google Play), except for Amazon devices such as Kindle Fire. Facebook login works on Amazon too, but Twitter doesn't. Nothing happens when clicking the "Authorize App" button in the Twitter login web view. The focus won't return from the web view to the app, and nothing happens in the web view either. The user must press "Cancel" to close the web view and go back to the app. On a device with Google Play we can see this in the log right when clicking "Authorize App": D/Prime31-TD( 7720): Redirect URL twitterplugin://connect?oauth_token=brXiIZQdbf7apQLm7auDfA6VPLj9i46R&oauth_verifier=Akxr85L4R1CJeTpO4GBXkZhFldnOiPfd D/Prime31-TD( 7720): found our redirect url. getting out of here and dismissing web view I/Prime31 ( 7720): login complete. fetching oauth_verifier I/Prime31 ( 7720): found verifier I/Prime31 ( 7720): continuing login with verifier I/Prime31 ( 7720): Fetching access token I/Prime31-OAS( 7720): access token endpoint: https://api.twitter.com/oauth/access_token On Amazon on the other hand we see this when clicking "Authorize App" after filling in username and password: D/WebCore (10156): *-* Start browser instrument D/Prime31-TD(10156): Loading URL: https://twitter.com/sessions D/Prime31-TD(10156): Redirect URL https://api.twitter.com/oauth/authorize W/InputManagerService( 197): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@422b9348 Then you have to click "Cancel": D/Prime31-TD(10156): Redirect URL twitterplugin://connect?denied=wZvhGGRm9dEVdVqAixmi9h30DZb0rNLX D/Prime31-TD(10156): found our redirect url. getting out of here and dismissing web view Trying to log in again gives us this: I/Prime31 (10156): spawning new thread to fetch reqeust token I/Prime31-OAS(10156): request token endpoint: https://api.twitter.com/oauth/request_token I/Prime31-OAS(10156): request token response code: 200 I/Prime31-OAS(10156): request token body: oauth_token=mAEnNMuqLdzhW5nTw566xwo4TUqtc3Fv&oauth_token_secret=ES1aEg58ermjJoi7m63eXgzEz0sw7j8c&oauth_callback_confirmed=true I/Prime31 (10156): got reqeust token. showing login dialog I/Prime31 (10156): showing login dialog I/Prime31 (10156): prepping login dialog with url: https://api.twitter.com/oauth/authorize?oauth_token=mAEnNMuqLdzhW5nTw566xwo4TUqtc3Fv D/WebCore (10156): *-* Start browser instrument I/Prime31-TD(10156): showing Twitter dialog filling parents horizontally and vertically D/WebCore (10156): *-* Start browser instrument D/Prime31-TD(10156): Loading URL: https://api.twitter.com/oauth/authorize?oauth_token=mAEnNMuqLdzhW5nTw566xwo4TUqtc3Fv When the web view opens this second time we're actually logged in! Clicking "Authorize App" this time shows: D/Prime31-TD(10156): Redirect URL twitterplugin://connect?oauth_token=mAEnNMuqLdzhW5nTw566xwo4TUqtc3Fv&oauth_verifier=7aQP2JuYLT6IfXL584YX6lMQZclZOOKY D/Prime31-TD(10156): found our redirect url. getting out of here and dismissing web view I/Prime31 (10156): login complete. fetching oauth_verifier I/Prime31 (10156): found verifier I/Prime31 (10156): continuing login with verifier I/Prime31 (10156): Fetching access token I/Prime31-OAS(10156): access token endpoint: https://api.twitter.com/oauth/access_token Then everything works after that, but it's not practical to login this way. Any help on how to solve this would be greatly appreciated! Do we perhaps need to add something to the AndroidManifest.xml file to make it work on Amazon devices? Message was edited by: peterturborilla
fire tablet
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

DougM@Amazon avatar image
DougM@Amazon answered
Hello Peter, Could you please tell us which Kindle Fire you are using, and what software version it is currently running? You will be able to find out how to get to the version information at http://www.amazon.com/gp/help/customer/display.html/ref=ya_kindle_sb_swupdates?nodeId=200529680 based on which Kindle Fire you are using. This will help in our investigation of the issue.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.