public static Intent getOpenFacebookIntent(Context context,String url) {
try {
context.getPackageManager().getPackageInfo("com.facebook.katana", 0);
return new Intent(Intent.ACTION_VIEW, Uri.parse(url));
} catch (Exception e) {
return new Intent(Intent.ACTION_VIEW, Uri.parse(url));
}
}
I used this code and it was working but now it does not. I need any intent to open a url in Facebook directly. This post helped me, Open Facebook page from Android app?