Skip to content Skip to sidebar Skip to footer

Android Open Facebook Page Link In Facebook App If Installed ,

how to open Facebook page link in Facebook App if installed , and if the app is not installed open in default browser in android ?? i tried this code but its not working ?? Fa

Solution 1:

check this link here

here more answer and this help you

click here Open Facebook page from Android app?


Solution 2:

Using this code you can open user profile

public static void opneFacebookProfile(Activity activity, String id) {
        Intent facebookIntent = new Intent(Intent.ACTION_VIEW);
        String facebookUrl = getFacebookPageURL(activity, id);
        facebookIntent.setData(Uri.parse(facebookUrl));
        activity.startActivity(facebookIntent);
    }

Solution 3:

I work with Unity Android games. The task is to open a Facebook Fan page in the FB app if it is installed. All I need to do is:

  1. Create Android Library and check if FB installed:

     public boolean isFbInstalled(Activity a) {
     PackageManager packageManager = a.getApplicationContext().getPackageManager();
     try {
         int versionCode = packageManager.getPackageInfo("com.facebook.katana",                  0).versionCode;
         if (versionCode >= 3002850) { //newer versions of fb app, no need to handle older
             return true;
         }
     } catch (PackageManager.NameNotFoundException e) {
         return false;
     }
    
     return false;
    

    }

  2. Go to this service and use generated links for different platforms :)


Post a Comment for "Android Open Facebook Page Link In Facebook App If Installed ,"