error CS0246: The type or namespace name `FBResult' could not be found

Dear unity devs,

I am implementing facebook authentication with photon networking, I had problems with keytool and openssl but those are solved :slight_smile:

The next problem is I couldn’t find any sollution on the web for this problem:
error CS0246: The type or namespace name `FBResult’ could not be found

I am using the script Photon has on their website.

void Awake()
{
FB.Init(SetInit, OnHideUnity);
}

    private void SetInit()
    {
        enabled = true;
        if (FB.IsLoggedIn)
        {
            Debug.Log("SetInit()");
            OnLoggedIn();
        }
    }

    private void OnHideUnity(bool isGameShown)
    {
        Debug.Log("OnHideUnity()");
    }

    void LoginCallback(FBResult result)
    {
        if (FB.IsLoggedIn)
        {
            OnLoggedIn();
        }
    }

FBResult has been depreciated since FacebookSDK 7.1

You’ll need to convert these to the correct type dependent upon the callback. For a login callback, you’ll want:

void LoginCallback(ILoginResult result)
{
...
}

I need for help you one more thing please
the method FB.API(… ,…, …) ? to name and picture
msng error : “No overload for method ‘API’ takes ‘2’ or ‘3’ arguments” … why ?

    public void Login(){
	FB.LogInWithReadPermissions (callback: OnLogin);
}

public void OnLogin(ILoginResult result){
	if (FB.IsLoggedIn) {
                    ***** here 3 parameters
		FB.API("/me?fields=first_name",HttpMethod.POST,DisplayUserName);
        FB.API("/me/picture?type=square&height=128&width=128",HttpMethod.GET);
	} else {
		Debug.Log ("Canceled Login");
	}
}

void DealWithProfilePictures(ILoginResult result){
	if(result.Error != null){
		Debug.Log ("Problem with getting profile picture");
                      *** 2 parameters
		//FB.API("/me/picture?type=square&height=128&width=128",DealWithProfilePictures);
        //pictureUser.sprite = result.ResultDictionary[];

		return;
	}
}

  void DisplayUserName(ILoginResult result){
	if(result.Error != null){
		nameText.text = "Welcome  " + result.ResultDictionary ["first_name"];
		return;
	}else{
		Debug.Log (result.Error);
	}
}