- Home /
Facebook Login " Invalid App Id : 0 "
Hi!
I developed an android game " Uberman " that has login/share/invite functions.
My facebook script looks like this : using UnityEngine; using UnityEngine.UI; using System; using System.Collections; using System.Collections.Generic; using System.Linq;
public class Test : MonoBehaviour {
public string status = "Ready";
public string lastResponse = "";
void Awake(){
}
void Start(){
FB.Init (OnInitComplete, OnHideUnity);
status = "FB.Init() called with " + FB.AppId;
Debug.Log (status);
}
#region FB.Init() example
private void OnInitComplete()
{
Debug.Log("FB.Init completed: Is user logged in? " + FB.IsLoggedIn);
}
private void OnHideUnity(bool isGameShown)
{
Debug.Log("Is game showing? " + isGameShown);
}
public void mm() {
FB.Login("email", LoginCallback);
}
public void ShareWithFrinds()
{
FB.Feed (
linkDescription: "Uberman wants to fly home !!",
linkCaption: "What's your HighScore?",
picture: "http://www.expotehnica.ro/data_files/product_photos/1533/thumb_1.jpg",
linkName: "Bored of killing pigs, flapping birds and crushing candy? Check this out, on Google Play !",
link: "https://play.google.com/store/apps/details?id=com.MODgaming.UberMan" + "/?challenge_brag=" + (FB.IsLoggedIn ? FB.UserId : "guest")
// link: "http://apps.facebook.com/" + FB.AppId + "/?challenge_brag=" + (FB.IsLoggedIn ? FB.UserId : "guest")
);
}
public void InviteFriends()
{
FB.AppRequest (
message: "Wanna play ?: ");
}
#endregion
void LoginCallback(FBResult result)
{
if (result.Error != null) {
lastResponse = "Error Response:\n" + result.Error;
Debug.Log (lastResponse);
}
else if (!FB.IsLoggedIn)
{
lastResponse = "Login cancelled by Player";
Debug.Log(lastResponse);
}
else
{
lastResponse = "Login was successful!";
Debug.Log(lastResponse);
}
}
}
In unity, it all works just fine. But on an android device, if i try to login, it opens Facebook and says Error " Invalid App Id : 0 ".
Has anybody encountered this ?
can you give me the assets that will make you share to facebook. Then i can find out what the problem is for you
Hi Rodude123 ! Can you give me an email so i can upload the assets ? Thanks in advance for the helping hand ! PS : if you can make this work, i'll give to you 10% of everything i make from this game :D
Hi DanSarpe here is my e-mail address: rohitpai2008@yahoo.co.uk
(tip: put the whole project into a zip folder and then send it to me). I will fix the problem as soon as possible. You don't have to give me 10% of everything you make, if you do put it on the app store you could put my name in the credits
can you give me your e-mail address so I know which one to look out for, thanks
Your answer
![](https://koobas.hobune.stream/wayback/20220613182804im_/https://answers.unity.com/themes/thub/images/avi.jpg)