I am trying to open a facebook profile with a button, but I have tried and always open with the browser and not with the facebook app, someone can help me please, so I have it at this time.
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.facebook);
//FACEBOOK
Uri uri = Uri.parse("https://www.facebook.com/uniagustiniana?ref=hl/");
Intent intent = new Intent(Intent.ACTION_VIEW,uri);
try{
startActivity(intent);
}catch(Exception e){
e.printStackTrace();
}finally {
finish();
}
}