Beispiel #1
0
 public FacebookWebHookJob(
     IFacebookAppService fbWebHookAppService,
     IRepository <FacebookWebHookRawData> hookRawDataRepo,
     ISocialAccountService socialAccountService
     )
 {
     _fbWebHookAppService  = fbWebHookAppService;
     _hookRawDataRepo      = hookRawDataRepo;
     _socialAccountService = socialAccountService;
 }
Beispiel #2
0
        protected async override Task ExecuteJob(IJobExecutionContext context)
        {
            var socialAccounts = await GetFacebookSocialAccounts(context);

            foreach (var socialAccount in socialAccounts)
            {
                IFacebookAppService sevice = DependencyResolver.Resolve <IFacebookAppService>();
                await UnitOfWorkManager.RunWithoutTransaction(socialAccount.SiteId, async() =>
                {
                    await sevice.PullMessagesJob(socialAccount);
                });
            }
        }
 /// <summary>
 /// FacebookWebHookController
 /// </summary>
 /// <param name="facebookWebHookAppService"></param>
 public FacebookWebHookController(IFacebookAppService facebookWebHookAppService)
 {
     _facebookWebHookAppService = facebookWebHookAppService;
 }