- Home /
Assets/scripts/fbLogin.cs(60,52): error CS1501: No overload for method `API' takes `3' arguments
i am trying to show facebook profile picture and username to the logged in user in my android game but i am facing this error: Assets/scripts/fbLogin.cs(60,52): error CS1501: No overload for method API' takes
3' arguments
void DealFBMenue ( bool isLoggedIn){
if (isLoggedIn) {
UIFBIsLoggedIn.SetActive (true);
UIFBIsNotLoggedIn.SetActive (false);
//get profile pic code
FB.API ("me/picture?type=med", HttpMethod.GET, DealWithProfileImg);
} else {
UIFBIsLoggedIn.SetActive (false);
UIFBIsNotLoggedIn.SetActive (true);
}
}
private void DealWithProfileImg(GraphResult result){
if(result.Error == null){
Image img = UIFBPPic.GetComponent<Image>();
img.sprite = Sprite.Create(result.Texture, new Rect (0, 0, 128, 128), new Vector2());
}
}
I'd say the error is pretty descriptive.... no overload for API() takes three arguments: https://developers.facebook.com/docs/unity/reference/current/FB.API
Answer by gibbie_learnersedge · Sep 20, 2016 at 06:08 AM
I think it takes 4 parameters. -query -method -callback -formData
You are only providing query,method and formData. You are missing a callback.
the missing is IDictionary formatData = null which i dont know what does it mean ! anyway else to have the profile pic if no one knows how to solve it ?
thank you
I have the same problema, now what's solution please thanks ...