1

I want to open my facebook profile link (on facebook app) on Button click. If the facebook app is present then facebook app should open with my profile. If app is not present browser should open.

How to do that?

akkk
  • 1,457
  • 4
  • 23
  • 41
  • You start an `Intent` containing the Facebook URI... I'm sure the Facebook Android documentation has pointers on that, no? – OneCricketeer Jul 30 '16 at 22:35
  • 1
    Possible duplicate of [Open Facebook page from Android app?](http://stackoverflow.com/questions/4810803/open-facebook-page-from-android-app) – Cyprien Aubry Jul 30 '16 at 23:17

1 Answers1

0

add this to java activity

mfblink = findViewById(R.id.fblink);
        mfblink.setMovementMethod(LinkMovementMethod.getInstance());

add this lines to layout xml

<ImageView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/mfblink "
            android:gravity="bottom"
            android:padding="10dp"
            android:text="@string/linktofb"
            android:background="@drawable/"
            android:textAlignment="center"
            android:textSize="15sp" />

add this lines to string.xml

<string name="linktofb">
    <a href="https://www.facebook.com/profile"></a>
    </string>
Habib
  • 27
  • 6