// Constructor da FacebookAPI public FacebookAPI() { manager = GetFB(); manager.facebookId = Info.facebookId; manager.facebookSecret = Info.facebookSecret; if (manager.users == null) manager.users = new Dictionary<string, User>(); HasToken(); }
// Checa se a prefab ja foi instanciada por inteiro bool FacebookAPIReady() { if (manager == null) { manager = GetFB(); } return((manager.facebookId != null && manager.facebookId != "" && manager.facebookSecret != null && manager.facebookSecret != "") ? true : false); }
// Constructor da FacebookAPI public FacebookAPI() { manager = GetFB(); manager.facebookId = Info.facebookId; manager.facebookSecret = Info.facebookSecret; if (manager.users == null) { manager.users = new Dictionary <string, User>(); } HasToken(); }
// Checa se existe um token setado na FacebookAPI bool HasToken() { if (manager == null) manager = GetFB(); if (manager.facebookToken.IsEmpty()) { if (!Save.GetString(PlayerPrefsKeys.FACEBOOK_TOKEN.ToString()).IsEmpty()) { SetToken(Save.GetString(PlayerPrefsKeys.FACEBOOK_TOKEN.ToString())); return true; } return false; } return true; }
// Checa se existe um token setado na FacebookAPI bool HasToken() { if (manager == null) { manager = GetFB(); } if (manager.facebookToken.IsEmpty()) { if (!Save.GetString(PlayerPrefsKeys.FACEBOOK_TOKEN.ToString()).IsEmpty()) { SetToken(Save.GetString(PlayerPrefsKeys.FACEBOOK_TOKEN.ToString())); return(true); } return(false); } return(true); }
// Retorna a prefab da Instancia do FacebookAPI private FacebookAPIManager GetFB() { if (manager != null) { return(manager); } GameObject _fbAPI = Flow.config; FacebookAPIManager _manager = _fbAPI.GetComponent <FacebookAPIManager>(); if (_manager == null) { _manager = _fbAPI.AddComponent <FacebookAPIManager>(); } return(_manager); }
// Checa se a prefab ja foi instanciada por inteiro bool FacebookAPIReady() { if (manager == null) manager = GetFB(); return (manager.facebookId != null && manager.facebookId != "" && manager.facebookSecret != null && manager.facebookSecret != "") ? true : false; }