Skip to main content

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***********************

Comments

Popular posts from this blog

Circular Seek Bar - Example

MyView.java package com.rakesh.androidcircularseekbar; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.RectF; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; public class MyView extends View {     /** The context */     private Context mContext;     /** The listener to listen for changes */     private OnSeekChangeListener mListener;     /** The color of the progress ring */     private Paint circleColor;     /** the color of the inside circle. Acts as background color */     private Paint innerColor;     /** The progress circle ring background */     private Paint circleRing;   ...

SSL pinning in Android - A brief discussion

HTTP protocol Communication between the client and a server typically non-encrypted or plain text while we use HTTP protocol.  Pitfall Any middle hacker can interrupt the connection between the client and server and manipulate the data as it involves no encryption. How to overcome this ? As the domain owner one can purchase a digital certificate from CA(Certificate Authority) who are considered as trusted.  A certificate will contain the Owner's name, public key , Issuer's(CA's) name,Issuer's(CA's) signature, domain details, expiry date etc . After the SSL/Leaf certificate is associated with a domain,the communication between client and server will be encrypted. Now the HTTP will become HTTPs. Note : Associating the SSL certificate means it enable the encryption between client and server but does not mean ,the domain owner will never misuse your personal information. How does SSL work ? Pitfall There is a problem here. Let's assume that there is a hacker comes i...

Android - Activity Life cycle

The android activity provides 7 call backs which will be invoked based on the states of the activity For better undersatnding,The Activity A and Activity B with the all the call backs overridden. ActivityA :  public class ActivityA extends Activity {     @Override    protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);         Log.e("A-OnCreate", "Object Creation");     }     public void next(View v) {         Intent i = new Intent(this, Main2Activity.class);         startActivity(i);     }     @Override    protected void onStart() {         super.onStart();         Log.e("A-onStart", "View is visible but will not be able to interact");     } ...