108 comments:

Your Project is not working i copied all your java files as well as add jar files. java files are not giving any error but twitter is also not opening in dialog what you called.just post your main xml also so it will clear to me.

The Post is only for reference to all and help to all, i am giving response asap and in above twitter integration example main.xml is not needed so i am not showing that file here and if you have any problem then tell me but don't give advice.

Please Download full source code from above link and after that if you have any problem then mail me on my mail id, so i will give you Complete solution with my Consumer_Key and Consumer_Secret_Key for testing purpose.

The tutorial is fantastic .. I am having trouble with using it though .. Once logged in ,it should not show authenticating dialog again ..It is showing in this case and when tried to repost the comment , it says login failed. When restarted the app,it worked. Do I have to do anything in onResume ?

No thats not my concern .. The error should be duplicate post and not login failed which is coming if we try to post the comment more than once after the start of an Activity. My major concern is ,it displays dialog box each time even after I have logged into it once ... What can be done for this ?

Store Access Token in shared preferences on first time login and after check in your activity, if user is logged in then no need to login again and if user is not logged in then open twitter login dialog.

Hello Deepak,I have written the same code and also given reference of all the java files mentioned above and also given the permission to access the internet though twitter is not opening.Please help me out.And also i wanted to know about facebook itegration.Mail id :- nirmal.shah.29@gmail.com

Same with me not working Im also getting the login failed even after multiple login attempts and even if my profile is displayed in authorize app(which means im logged in twitter) page it shows a login failed error when it returns to the app

04-05 21:38:16.038: W/webcore(24625): java.lang.Throwable: EventHub.removeMessages(int what = 107) is not supported before the WebViewCore is set up.04-05 21:38:16.038: W/webcore(24625): at android.webkit.WebViewCore$EventHub.removeMessages(WebViewCore.java:2404)04-05 21:38:16.038: W/webcore(24625): at android.webkit.WebViewCore$EventHub.access$12300(WebViewCore.java:1180)

There is a small bug that causes login failed, but is pretty easy to solve:

The error is MalFormedUrlException: Unknown protocol: x-oauthflow-twitter because in the method getVerifier (line 188 TwitterApp.java) we are trying to replace "twitterapp" text from the callBakUrl when we are using "x-oauthflow-twitter" text before the URL.

Hi Deepak,I am stuck in a project, hope you could help me. I want to show all the twitter tweets in my android list view from a twitter public page(e.g www.twitter.com/givecentral). I have written all the code and also created consumer key and secret key. But the application is getting stopped everytime. Can you help me on this and send me the working source code. My id is mukesh17m@gmail.com.. Hope you'll reply me soon..

have you registered your application with https://dev.twitter.com ? Please register your application here and generate Access Token and Access TOken Secret key + replace the consumer key and secret key of the above code with your application's keys and try. i changed the application access from read only to read/write also so it will be able to post tweets on my account, still i'm facing issue getting the login page but i'm able to see my application's icon on the webview.

Hi, i downloaded your zip file, extracted and imported in to my eclipse workspace. I replaced TWEET_AUTH_KEY, TWEET_AUTH_SECRET_KEY in the TwitterSession.java and run the application, "Login Failed" toast is displaying every time i login. This is logcat http://www.evernote.com/shard/s283/sh/ccf921a3-79fd-4eb2-82ae-7c818c0e24ac/bef5d02ee96fc47921038f518abec021 please help me sloving the problem OR mail me the latest zip file (shashishiva9@gmail.com)

Hi I have downlaod your demo code but i am getting Login failed message,Now what i do ......please reply......thankif you have working code plese share with me,my email Id is viswakarmalovekush@gmail.com

Thank you for providing approximately well running code but I got small error exception after login success and have also don't got access token ID.The error shown like this after login...1). oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

Have you solution of this problem. Used Lib: 1). signpost-commonshttp4-1.2.1.1.jar2). signpost-core-1.2.1.1.jar3). signpost-jetty6-1.2.1.1.jar4). twitter4j-core-2.2.5.jarAccording to me below data are going through SSL and current libs are not support SSL certificate.private static final String TWITTER_ACCESS_TOKEN_URL = "https://api.twitter.com/oauth/access_token"; private static final String TWITTER_AUTHORZE_URL = "https://api.twitter.com/oauth/authorize"; private static final String TWITTER_REQUEST_URL = "https://api.twitter.com/oauth/request_token";

Same with me not working Im also getting the login failed even after multiple login attempts and even if my profile is displayed in authorize app(which means im logged in twitter) page it shows a login failed error when it returns to the app