protected override void OnInit(EventArgs e) { base.OnInit(e); FaceBook = (FacebookConnect)FacebookConnect.GetCurrent(HttpContext.Current.Items); registerSteveButton.Click += new EventHandler(RegisterSteve_ClickEvent); registerGeneraluSwitch.Click += new EventHandler(RegisterGeneraluSwitch_ClickEvent); }
protected virtual void OnPreAuthenication(object sender, EventArgs e) { HttpApplication application = sender as HttpApplication; IFacebookApi api = new FacebookApi(); bool authenicated = false; IHttpAuthenication authenication = new HttpAuthenication(_config, application.Context.Request); if (authenication.IsConnected()) { authenication.Authenicate(api); authenicated = true; } IFacebookConnect connect = new FacebookConnect(api, authenicated); CacheApi(api, application.Context.Items); CacheFacebookConnect(connect, application.Context.Items); }