Translate

Wednesday, March 27, 2013

Twitter Integration with android


First of all , you must have an account with twitter .If you don't have means just go to Twitter site and Sign up.

Then go to this link and sign in with your account you've created before .

Now goto "My applications" there you can find create a new application .Fill the fields shown there(All fields are preferable ,don't leave any fields blank). In website and callback URL ,you need to type like http://********** .for an Instance http://www.google.com is preferred than www.google.com .

If all is done,then click Create your twitter application.


Once your application is created, click on the settings tab  and select “Read and Write” in “Access” from the “Application Type” section (shown in pic below). This will enable sending tweets from your applications.
Note : These are basic settings. You may also choose to upload icon, mention organization name/website, change OAuth setting of your application.

 IF THE IMAGES BELOW AREN"T VISIBLE CLICK THE IMAGES TO VIEW BETTER

In application Details fill like below,










       




Note:Setting appIcon is optional

In Application fill like the following



Now,Its all over with Settings.





In Details Tab,You' can see the following



Now,Note down your consumer key and consumer secret .Then download my source code from here

In my source code ,you find Twitter_Test_AppActivity.java inside the package "com.rakesh.android" .
open that file and just edit three lines.




private static final String CONSUMER_KEY = "<your consumer key>";
private static final String CONSUMER_SECRET = "<your consumer secret>";
private static final String TWITTER_USER = "<your Twitter mail Id>";

Save the file and Run . you can now tweet with your app . After tweeted check if it's working or not by logging in with your Twitter account  here




  ********************COMMENTS ARE WELCOME***********************

No comments:

Post a Comment