Beispiel #1
0
        protected override void Initialize(MessengerCredentials credentials = null)
        {
            base.Initialize(credentials);

            Authenticator       = new Authenticator(credentials);
            SendApi             = new SendApi(credentials);
            UserProfileApi      = new UserProfileApi(credentials);
            MessengerProfileAPI = new MessengerProfileAPI(credentials);
        }
        protected virtual void Initialize(MessengerCredentials credentials = null)
        {
            _FacebookGraphApiUrl = "https://graph.facebook.com/v2.6";
            _MessengerApiUrl     = $"{_FacebookGraphApiUrl}/me";

            if (credentials == null)
            {
                _Credentials = CreateCredentials
                               (
                    Settings.Default.AppSecret,
                    Settings.Default.PageToken,
                    Settings.Default.VerifyToken
                               );
            }
            else
            {
                _Credentials = credentials;
            }
        }
 public ApiBase(MessengerCredentials credentials)
 {
     Initialize(credentials);
 }
Beispiel #4
0
 public static MessengerPlatform CreateInstance(MessengerCredentials credentials = null)
 {
     return(new MessengerPlatform(credentials));
 }
Beispiel #5
0
 public MessengerPlatform(MessengerCredentials credentials) : base(credentials)
 {
 }