Inheritance: OAuthAuthenticator
Esempio n. 1
0
        public FacebookApi(string identifier, string clientId, string clientSecret, HttpMessageHandler handler = null) : base(identifier, clientId, clientSecret, handler)
        {
            InitFacebook();

            Scopes        = new[] { "public_profile" };
            authenticator = new FacebookAuthenticator
            {
                ClientId     = clientId,
                ClientSecret = clientSecret,
            };
        }
        public FacebookApi(string identifier, string clientId, string clientSecret, HttpMessageHandler handler = null) : base(identifier, clientId, clientSecret, handler)
        {
            InitFacebook();

            Scopes = new[] { "public_profile", "email", "user_photos", "publish_actions", "manage_pages", "publish_pages" };

            authenticator = new FacebookAuthenticator
            {
                ClientId     = clientId,
                ClientSecret = clientSecret,
            };
        }
Esempio n. 3
0
		public FacebookApi(string identifier, string clientId, string clientSecret, HttpMessageHandler handler = null) : base(identifier, clientId, clientSecret, handler)
		{
			BaseAddress = new Uri("https://graph.facebook.com");
			TokenUrl = "https://graph.facebook.com/v2.3/oauth/access_token?";
			Scopes = new[] { "public_profile" };
			authenticator = new FacebookAuthenticator
			{
				ClientId = clientId,
				ClientSecret = clientSecret,
			};

			CurrentShowAuthenticator = (a) =>
			{
				a.Cookies = CurrentOAuthAccount?.Cookies;
				if (ShowFacebookAuthenticator != null)
					ShowFacebookAuthenticator(a);
				else
					ShowAuthenticator(a);
			};
		}
Esempio n. 4
0
        public FacebookApi(string identifier, string clientId, string clientSecret, HttpMessageHandler handler = null) : base(identifier, clientId, clientSecret, handler)
        {
            BaseAddress   = new Uri("https://graph.facebook.com");
            TokenUrl      = "https://graph.facebook.com/v2.3/oauth/access_token?";
            Scopes        = new[] { "public_profile" };
            authenticator = new FacebookAuthenticator
            {
                ClientId     = clientId,
                ClientSecret = clientSecret,
            };

            CurrentShowAuthenticator = (a) =>
            {
                if (ShowFacebookAuthenticator != null)
                {
                    ShowFacebookAuthenticator(a);
                }
                else
                {
                    ShowAuthenticator(a);
                }
            };
        }
Esempio n. 5
0
 public FacebookApi(string identifier, FacebookAuthenticator authenticator, HttpMessageHandler handler = null) : base(identifier, authenticator, handler)
 {
     InitFacebook();
     Scopes = authenticator.Scope?.ToArray() ?? new[] { "public_profile" };
 }