android - How to integrate twitter in web view? -


Hi, I'm building an app in which I use twitter4j lib for the integration of Twitter which works successfully for under 2.3. When I run application on 4.o application stops. Here: 1. I used the default browser for Twitter2 And I want to use the web view instead of the browser. So how to handle Twitter VB via web view? To make use of the browser I make the following changes in AndroidMainfest.xml

  & lt; Intent-filter & gt; & Lt; Action Android: name = "android.intent.action.VIEW" /> & Lt; Category android: name = "android.intent.category.DEFAULT" /> & Lt; Category android: name = "android.intent.category.BROWSABLE" /> & Lt; Data Android: Schema = "oauth" Android: host = "t4jsample" /> & Lt; / Intent-Filter & gt; Add the following code to more than 9 versions  

  if ( Android.os.build.VERSION.SDK_INT> 9) {StrictMode.ThreadPolicy Policy = New StrictMode.ThreadPolicy.Builder () .permitAll (). Build (); StrictMode.setThreadPolicy (policy); }  

This is a good link to link Twitter using twitter4j (). You must load the authorization url in the webview so that you can open the login page in the application.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -