Currently when user click the button , they will directly launch the Facebook and Twitter app. However I want to let user able to choose use browser or application to view the profile. Another problem is I can't find Instagram Protocol to launch the app to view the profile, I only can view on webpage. Anyone Got Idea?
btnFb.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String uri = "fb://page/80829078894";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(intent);
}
});
btnTwitter.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String uri = "twitter://user?user_id=87114940";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(intent);
}
});
btnInstagram.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String uri = "http://instagram.com/plaza_semanggi";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(intent);
}
});