/// <summary>
        /// Log in to facebook.
        /// </summary>
        private void LoginToFacebook()
        {
            if (QvFacebookOAuthResult == null || !QvFacebookOAuthResult.IsSuccess)
            {
                // Show the facebook login dialog
                var facebookLoginDialog = new FacebookLoginDialog();
                facebookLoginDialog.ShowDialog();

                QvFacebookOAuthResult = facebookLoginDialog.FacebookOAuthResult;

                if (QvFacebookOAuthResult == null)
                {
                    QvxLog.Log(QvxLogFacility.Application, QvxLogSeverity.Notice, "Init() - Facebook Login error. The user may have canceled the operation or there could be network errors.");
                    // Tell QlikView that the login has failed
                    throw new Exception("Facebook login error. The user may have canceled the operation or there could be network errors.");
                }
                if (!QvFacebookOAuthResult.IsSuccess)
                {
                    QvxLog.Log(QvxLogFacility.Application, QvxLogSeverity.Notice, String.Format("Init() - Facebook Login error: {0}", QvFacebookOAuthResult.ErrorDescription));
                    // Tell QlikView that the login has failed
                    throw new Exception(QvFacebookOAuthResult.ErrorDescription);
                }
            }
        }
        /// <summary>
        /// Log in to facebook.
        /// </summary>
        private void LoginToFacebook()
        {
            if (QvFacebookOAuthResult == null || !QvFacebookOAuthResult.IsSuccess)
            {
                // Show the facebook login dialog
                var facebookLoginDialog = new FacebookLoginDialog();
                facebookLoginDialog.ShowDialog();

                QvFacebookOAuthResult = facebookLoginDialog.FacebookOAuthResult;

                if (QvFacebookOAuthResult == null)
                {
                    QvxLog.Log(QvxLogFacility.Application, QvxLogSeverity.Notice, "Init() - Facebook Login error. The user may have canceled the operation or there could be network errors.");
                    // Tell QlikView that the login has failed
                    throw new Exception("Facebook login error. The user may have canceled the operation or there could be network errors.");
                }
                if (!QvFacebookOAuthResult.IsSuccess)
                {
                    QvxLog.Log(QvxLogFacility.Application, QvxLogSeverity.Notice, String.Format("Init() - Facebook Login error: {0}", QvFacebookOAuthResult.ErrorDescription));
                    // Tell QlikView that the login has failed
                    throw new Exception(QvFacebookOAuthResult.ErrorDescription);
                }
            }
        }