When I try to open a Facebook Profile through the official Facebook App i have this error: error loading the biography, the content is not available. I tried with many codes but nothing. Only if Facebook App is not installed on the device work right with the browser. Here is the current code:
try
{
Intent followIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("fb://profile/"+id_facebook));
startActivity(followIntent);
final Handler handler = new Handler();
handler.postDelayed(new Runnable()
{
@Override
public void run() {
Intent followIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("fb://profile/"+id_facebook));
startActivity(followIntent);
}
}, 1000 * 2);
}
catch (Exception e)
{
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/"+id_facebook)));
String errorMessage = (e.getMessage()==null)?"Message is empty":e.getMessage();
Log.e("Unlock_ScreenActivity:FacebookAppNotFound" ,errorMessage);
}
UPDATE:
When I give up and i only put the https URI, Android let me choose between Facebook APP and the browser, and i like it! So my question is answered =D