I don't know what's wrong. I know that FB.Login
is already deprecated. I don't know what syntax to use.
public class FBholder : MonoBehaviour {
void Awake(){
FB.Init (SetInit, OnHideUnity);
}
private void SetInit()
{
Debug.Log ("FB Init Done");
if (FB.IsLoggedIn) {
Debug.Log ("FB Logged in");
} else {
FBlogin ();
}
}
private void OnHideUnity(bool isGameShown)
{
if (!isGameShown) {
Time.timeScale = 0;
} else {
Time.timeScale = 1;
}
}
void FBlogin()
{
FB.LogInWithPublishPermissions ("user_about_me, user_birthday", AuthCallback);
}
void AuthCallback(ILoginResult result)
{
if (FB.IsLoggedIn) {
Debug.Log ("FB Logged in worked");
} else {
Debug.Log ("FB Logged in failed");
}
}
}
and I'm getting this error
Assets/FBholder.cs(40,6): error CS1502: The best overloaded method match for `Facebook.Unity.FB.LogInWithPublishPermissions(System.Collections.Generic.IEnumerable, Facebook.Unity.FacebookDelegate)' has some invalid arguments
and this
Assets/FBholder.cs(40,35): error CS1503: Argument
#1' cannot convert
string' expression to type `System.Collections.Generic.IEnumerable'