Exemplo n.º 1
0
        public OAuth2TokenCredential GetRefreshToken(string refreshToken, bool throwException = false)
        {
            var response = base.GetRefreshToken(GoogleConstants.TokenUrl, refreshToken);

            OAuth2TokenCredential credential = response.ContentObject;

            if (!response.Completed || credential == null || !credential.Success)
            {
                if (throwException)
                {
                    credential.ThrowException();
                }
            }

            if (credential != null)
            {
                this.Credential = credential;
                return(credential);
            }

            return(null);
        }
 public GoogleAnalyticsClient(string appID, string appSecret, OAuth2TokenCredential credential)
     : base(appID, appSecret, credential)
 {
 }
Exemplo n.º 3
0
        ///-------------------------------------------------------------------------------------------------
        /// <summary>   Initializes a new instance of the FacebookSDK.FacebookClient class. </summary>
        ///
        /// <author>    Anwar Javed. </author>
        /// <date>  4:29 PM 06 May 2015. </date>
        ///
        /// <param name="appID">
        ///     Identifier for the application.
        /// </param>
        /// <param name="appSecret">
        ///     The application secret.
        /// </param>
        /// <param name="credential">
        ///     The credential.
        /// </param>
        ///-------------------------------------------------------------------------------------------------

        public FacebookClient(string appID, string appSecret, OAuth2TokenCredential credential)
            : base(appID, appSecret, credential)
        {
        }
Exemplo n.º 4
0
        ///-------------------------------------------------------------------------------------------------
        /// <summary>   Initializes a new instance of the FacebookSDK.FacebookClient class. </summary>
        ///
        /// <author>    Anwar Javed. </author>
        /// <date>  4:29 PM 06 May 2015. </date>
        ///
        /// <param name="appID">
        ///     Identifier for the application.
        /// </param>
        /// <param name="appSecret">
        ///     The application secret.
        /// </param>
        /// <param name="credential">
        ///     The credential.
        /// </param>
        ///-------------------------------------------------------------------------------------------------

        public FacebookClient(string appID, string appSecret, OAuth2TokenCredential credential)
            : base(appID, appSecret, credential)
        {
        }
Exemplo n.º 5
0
 public GoogleContactsClient(string appID, string appSecret, OAuth2TokenCredential credential)
     : base(appID, appSecret, credential)
 {
 }
Exemplo n.º 6
0
 public GoogleUrlShortnerClient(string appID, string appSecret, OAuth2TokenCredential credential)
     : base(appID, appSecret, credential)
 {
 }