title: How to open facebook profile/page from ImageButton (Android)
body: <p>I'm new to android development </p>
  
  <p>I developing a new app with imagebutton to facebook profile/page</p>
  
  <p>I tried this code but this code open the facebook in the browser</p>
  
  <pre><code>public class AboutActivity extends Activity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_about);
  
  
      ImageButton f = (ImageButton)findViewById(R.id.f_logo);
        f.setOnClickListener(new OnClickListener() 
         {  
              public void onClick(View arg0) 
                { 
                     Intent browserIntent = new Intent(Intent.ACTION_VIEW,Uri.parse(
                     "http://www.facebook.com/sarmad.waleed.7"));
                      startActivity(browserIntent);
  
                     }
               }); 
            }
        }
  </code></pre>
  
  <p><strong>My question</strong> is how open the facebook profile/page <strong>from imagebutton in FB app</strong> (if it installed) and if not then open it in the browser</p>
  
  <p>I also check this </p>
  
  <p><a href="https://stackoverflow.com/questions/22317513/how-to-link-the-image-button-to-a-facebook-page-in-android">how to link the image button to a facebook page in android</a></p>
  
  <p>but its the same facebook page opens in the browser </p>
  
  <p>then I tried with "com.facebook.katana" but I don't know how to do it</p>