Jazz
Jazz

Reputation:

twitter functionally on android

I want to add some features of twitter in my application.

1) Display the profile of any selected person, if click on that the person's profile will open

2) replies to a tweet.

Plzz send me any source for implementing this thing in my application. Any simple example related to this.

Thanx in advance.

Upvotes: 0

Views: 201

Answers (1)

Isuru Samarasinghe
Isuru Samarasinghe

Reputation: 101

Steps:

1) Find the person's Twitter ID:

https://api.twitter.com/1/users/show.json?screen_name=PERSONS_USERNAME

Listed in first row for example:

{"id_str":"123123","id":123123,"

2) My piece of code:

private void showTwitter() {
    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setClassName("com.twitter.android", "com.twitter.android.ProfileActivity");
    // put the id below REMEMBER THE L AT THE END  
    intent.putExtra("user_id", 123123L);
    this.startActivity(intent);     
}

Upvotes: 2

Related Questions