public FacebookAuthHelper(bool requiresPublishPermissions, Action afterAuthAction) { FacebookAuthHelper._instance = this; this.requiresPublishPermissions = requiresPublishPermissions; this.afterAuthAction = afterAuthAction; FacebookManager.sessionOpenedEvent += new Action(this.sessionOpenedEvent); FacebookManager.loginFailedEvent += new Action <P31Error>(this.loginFailedEvent); }
public void cleanup() { if (this.afterAuthAction != null) { FacebookManager.sessionOpenedEvent -= new Action(this.sessionOpenedEvent); FacebookManager.loginFailedEvent -= new Action <P31Error>(this.loginFailedEvent); } FacebookAuthHelper._instance = null; }
public void cleanup() { // if the afterAuthAction is not null we have not yet cleaned up if (afterAuthAction != null) { FacebookManager.sessionOpenedEvent -= sessionOpenedEvent; FacebookManager.loginFailedEvent -= loginFailedEvent; if (requiresPublishPermissions) { FacebookManager.reauthorizationSucceededEvent -= reauthorizationSucceededEvent; FacebookManager.reauthorizationFailedEvent -= reauthorizationFailedEvent; } } _instance = null; }
#pragma warning restore public FacebookAuthHelper(bool requiresPublishPermissions, Action afterAuthAction) { _instance = this; this.requiresPublishPermissions = requiresPublishPermissions; this.afterAuthAction = afterAuthAction; // login FacebookManager.sessionOpenedEvent += sessionOpenedEvent; FacebookManager.loginFailedEvent += loginFailedEvent; // reauth if (requiresPublishPermissions) { FacebookManager.reauthorizationSucceededEvent += reauthorizationSucceededEvent; FacebookManager.reauthorizationFailedEvent += reauthorizationFailedEvent; } }
public void cleanup() { // if the afterAuthAction is not null we have not yet cleaned up if( afterAuthAction != null ) { FacebookManager.sessionOpenedEvent -= sessionOpenedEvent; FacebookManager.loginFailedEvent -= loginFailedEvent; } _instance = null; }
#pragma warning restore public FacebookAuthHelper( bool requiresPublishPermissions, Action afterAuthAction ) { _instance = this; this.requiresPublishPermissions = requiresPublishPermissions; this.afterAuthAction = afterAuthAction; // login FacebookManager.sessionOpenedEvent += sessionOpenedEvent; FacebookManager.loginFailedEvent += loginFailedEvent; }