Unity Like Facebook Page through app

Hi Unitarians,

I have an android app, and I have a button that I want my users to click to go to my facebook page and like it. If I use Application.OpenURL("https://www.facebook.com/youthquality");, then it goes through the browser, which isn’t ideal. I want it so that so it goes to the facebook app, if it is on the phone. I use the following code that works mostly:

void Facebook () {


			Debug.Log("Unity iPhone");

			if(checkPackageAppIsPresent("com.facebook.katana")) {
				Application.OpenURL("fb://profile/xxx"); //there is Facebook app installed so let's use it
			else {
				Application.OpenURL("https://www.facebook.com/xxx"); // no Facebook app - use built-in web browser


	private bool checkPackageAppIsPresent(string package)
		AndroidJavaClass up = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
		AndroidJavaObject ca = up.GetStatic<AndroidJavaObject>("currentActivity");
		AndroidJavaObject packageManager = ca.Call<AndroidJavaObject>("getPackageManager");
		//take the list of all packages on the device
		AndroidJavaObject appList = packageManager.Call<AndroidJavaObject>("getInstalledPackages",0);
		int num = appList.Call<int>("size");
		for(int i = 0; i < num; i++)
			AndroidJavaObject appInfo = appList.Call<AndroidJavaObject>("get", i);
			string packageNew = appInfo.Get<string>("packageName");
			if(packageNew.CompareTo(package) == 0)
				return true;
		return false;

The problem with the code is that it opens the facebook app, but it goes tot he newsfeed, and not to my page. How would I make it go to my page?

My actual page has a set name that I put, not numbers. It is not a profile, it is a page.

I use only this line:


And worked like a charm for me. One thing to note: while my page’s address is Facebook fb://page/foxy.the.game didn’t work when I tested. Use your Facebook Page ID instead.

Go to SOLO and at the bottom, you will see your Facebook Page ID

We found that /page/ opened the facebook app, but not the proper page.

We had to use /profile/ instead. Perhaps it has something to do with the type of page being linked to?


how to DeserializeJSONPage result ??

how to DeserializeJSONPage result ?? please help me.