Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Open facebook, twitter and linkedIn user profile using username

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 1.08k
    Comment on it

    Sometimes we need to open user profile of Facebook, Twitter or LinkedIn by using the username in android.

    To do this, we just create a uri to open the profile.

    We can implement this in onclick() of any view.

    For Facebook:

    String url = ""+mFacebookUrlString;
                Intent facebookAppIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));

    For Twitter:

    String url = ""+mTwitterUrlString;
                Intent twitterAppIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));

    For LinkedIn:

    String url = ""+mLinkedInurlString;
                Intent linkedInAppIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: