I want to Facebook SDK Integration for Facebook Mobile Install Ads.
I added to Facebook Unity Plugin. I was completed the FB APP ID, Keyhash etc.
Im using FB Plugin 6.0.
I added to MainMenu.cs FB Init code;
public static void ActivateApp(){
//FB.Init (true);
FB.ActivateApp();
}
void Start() {
ActivateApp ();
//some code.. }
I have error;
NullReferenceException: Facebook object is not yet loaded. Did you call FB.Init()?
FB.get_FacebookImpl () (at Assets/Facebook/Scripts/FB.cs:28)
FB.ActivateApp () (at Assets/Facebook/Scripts/FB.cs:272)
MenuManager.ActivateApp () (at Assets/Scripts/Menu/MenuManager.cs:48)
MenuManager.Start () (at Assets/Scripts/Menu/MenuManager.cs:63)
Thanks for helping.
You must call FB.Init() first before any other calls. See this page https://developers.facebook.com/docs/javascript/reference/FB.init/v2.3
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.