Example #1
0
        private static void facebookreport()
        {
            List <Domain.Socioboard.Domain.FacebookAccount> lstFacebookAccount = new List <Domain.Socioboard.Domain.FacebookAccount>();

            Api.FacebookAccount.FacebookAccount ApiFacebookAccount = new Api.FacebookAccount.FacebookAccount();
            Api.FacebookReport.FacebookReport   ApiFacebookReport  = new Api.FacebookReport.FacebookReport();
            lstFacebookAccount = (List <Domain.Socioboard.Domain.FacebookAccount>) new JavaScriptSerializer().Deserialize(ApiFacebookAccount.AllFacebookPageDetails(), typeof(List <Domain.Socioboard.Domain.FacebookAccount>));

            foreach (Domain.Socioboard.Domain.FacebookAccount item in lstFacebookAccount)
            {
                if ((item.Type == "page" || item.Type == "Page") && !string.IsNullOrEmpty(item.AccessToken))
                {
                    ApiFacebookReport.Timeout = -1;
                    try
                    {
                        string ret = ApiFacebookReport.GetFacebookdata(item.FbUserId, item.AccessToken);
                    }
                    catch (Exception ex)
                    {
                    }
                    Thread.Sleep(5 * 1000);
                }
            }
        }
Example #2
0
        private static void facebookreport()
        {

            List<Domain.Socioboard.Domain.FacebookAccount> lstFacebookAccount = new List<Domain.Socioboard.Domain.FacebookAccount>();
            Api.FacebookAccount.FacebookAccount ApiFacebookAccount = new Api.FacebookAccount.FacebookAccount();
            Api.FacebookReport.FacebookReport ApiFacebookReport = new Api.FacebookReport.FacebookReport();
            lstFacebookAccount = (List<Domain.Socioboard.Domain.FacebookAccount>)new JavaScriptSerializer().Deserialize(ApiFacebookAccount.AllFacebookPageDetails(), typeof(List<Domain.Socioboard.Domain.FacebookAccount>));

            foreach (Domain.Socioboard.Domain.FacebookAccount item in lstFacebookAccount)
            {
                if ((item.Type == "page" || item.Type == "Page") && !string.IsNullOrEmpty(item.AccessToken))
                {
                    ApiFacebookReport.Timeout = -1;
                    try
                    {
                        string ret = ApiFacebookReport.GetFacebookdata(item.FbUserId, item.AccessToken);
                    }
                    catch (Exception ex)
                    {
                    }
                    Thread.Sleep(5 * 1000);
                }
            }
        }