private bool FillFacebookInfo(ClientInfo ManagedUserInfo)
        {
            if (ManagedUserInfo != null)
                if (!string.IsNullOrEmpty(ManagedUserInfo.FacebookId))
                {
                    using (Database db = new MySqlDatabase())
                    {
                        ClientInfo ci = db.GetClientInfo(Convert.ToInt64(Session["managed.userid"]));

                        Session["FBACC"] = db.GetSocialCredential(ci.ClientId, SocialConnector.Facebook, "accesstoken");

                        string expiresRaw = db.GetSocialCredential(ci.ClientId, SocialConnector.Facebook, "accesstokenexpires");

                        Facebook.AuthenticationService authServices = new Facebook.AuthenticationService();

                        if (authServices.TryAuthenticateAdminFBCred(expiresRaw, Convert.ToString(Session["FBACC"])))
                        {
                            Me me = authServices.GetMe(Convert.ToString(Session["FBACC"]));

                            try
                            {
                                Session["FBID"] = me.Id;
                            }
                            catch { }

                            FillFBFriendList(Convert.ToString(Session["FBACC"]));

                            FillFBPageList(Convert.ToString(Session["FBACC"]));

                            cbxShareToUserWall.Enabled = true;

                            cbxShareToUserWall.Visible = true;

                            divShareToUserWall.Visible = true;

                            return true;
                        }
                        else
                        {
                            Session["FBACC"] = Session["FBID"] = null;

                            db.RemoveSocialCredential(ci.ClientId, SocialConnector.Facebook);

                            db.UpdateFacebookID(ci.ClientId);

                            FillFBFriendList(null);

                            FillFBPageList(null);

                            cbxShareToUserWall.Enabled = false;

                            cbxShareToUserWall.Visible = false;

                            divShareToUserWall.Visible = false;

                            return false;
                        }
                    }
                }

            Session["FBACC"] = Session["FBID"] = null;

            FillFBFriendList(null);

            FillFBPageList(null);

            cbxShareToUserWall.Enabled = false;

            cbxShareToUserWall.Visible = false;

            divShareToUserWall.Visible = false;

            return false;
        }