Exemple #1
0
        public string GetData(object userId, string profileId)
        {
            string ret    = string.Empty;
            Guid   UserId = (Guid)userId;

            Api.FacebookFeed.FacebookFeed ApiObjFacebookFeed = new Api.FacebookFeed.FacebookFeed();
            ApiObjFacebookFeed.getAllFacebookFeedsByUserIdAndProfileId(userId.ToString(), profileId);
            Api.FacebookAccount.FacebookAccount             ApiObjFacebookAccount = new Api.FacebookAccount.FacebookAccount();
            List <Domain.Socioboard.Domain.FacebookAccount> lstFacebookAccounts   = (List <Domain.Socioboard.Domain.FacebookAccount>)(new JavaScriptSerializer().Deserialize(ApiObjFacebookAccount.GetFacebookAccountByUserId(UserId.ToString()), typeof(List <Domain.Socioboard.Domain.FacebookAccount>)));

            //FacebookHelper fbhelper = new FacebookHelper();

            foreach (FacebookAccount itemFb in lstFacebookAccounts)
            {
                //FacebookHelper objFbHelper = new FacebookHelper();
                try
                {
                    //Facebook profile data
                    Api.Facebook.Facebook ApiobjFacebook = new Api.Facebook.Facebook();
                    ret = ApiobjFacebook.GetFacebookData(itemFb.FbUserId, itemFb.UserId.ToString());


                    //Add Facebook Stats
                    Api.FacebookStats.FacebookStats _FacebookStats = new Api.FacebookStats.FacebookStats();
                    bool abc = _FacebookStats.AddFacebookFriendsGender(itemFb.UserId.ToString(), itemFb.FbUserId);
                }
                catch (Exception Err)
                {
                    Console.Write(Err.Message);
                }
            }
            return(ret);
        }
        public string GetData(object userId, string profileId)
        {
            string ret = string.Empty;
            Guid UserId = (Guid)userId;
            Api.FacebookFeed.FacebookFeed ApiObjFacebookFeed = new Api.FacebookFeed.FacebookFeed();
            ApiObjFacebookFeed.getAllFacebookFeedsByUserIdAndProfileId(userId.ToString(), profileId);
            Api.FacebookAccount.FacebookAccount ApiObjFacebookAccount = new Api.FacebookAccount.FacebookAccount();
            List<Domain.Socioboard.Domain.FacebookAccount> lstFacebookAccounts = (List<Domain.Socioboard.Domain.FacebookAccount>)(new JavaScriptSerializer().Deserialize(ApiObjFacebookAccount.GetFacebookAccountByUserId(UserId.ToString()), typeof(List<Domain.Socioboard.Domain.FacebookAccount>)));
            //FacebookHelper fbhelper = new FacebookHelper();

            foreach (FacebookAccount itemFb in lstFacebookAccounts)
            {
                //FacebookHelper objFbHelper = new FacebookHelper();
                try
                {
                    //Facebook profile data
                    Api.Facebook.Facebook ApiobjFacebook = new Api.Facebook.Facebook();
                    ret = ApiobjFacebook.GetFacebookData(itemFb.FbUserId, itemFb.UserId.ToString());


                    //Add Facebook Stats
                    Api.FacebookStats.FacebookStats _FacebookStats = new Api.FacebookStats.FacebookStats();
                    bool abc = _FacebookStats.AddFacebookFriendsGender(itemFb.UserId.ToString(), itemFb.FbUserId);

                }
                catch (Exception Err)
                {
                    Console.Write(Err.Message);
                }
            }
            return ret;
        }
        public string GetData(object userId, string profileId)
        {
            string ret = string.Empty;
            try
            {
                Guid UserId = (Guid)userId;
                Api.FacebookFeed.FacebookFeed ApiObjFacebookFeed = new Api.FacebookFeed.FacebookFeed();
                ApiObjFacebookFeed.getAllFacebookFeedsByUserIdAndProfileId(userId.ToString(), profileId);
                Api.FacebookAccount.FacebookAccount ApiObjFacebookAccount = new Api.FacebookAccount.FacebookAccount();
                List<Domain.Myfashion.Domain.FacebookAccount> lstFacebookAccounts = (List<Domain.Myfashion.Domain.FacebookAccount>)(new JavaScriptSerializer().Deserialize(ApiObjFacebookAccount.GetFacebookAccountByUserId(UserId.ToString()), typeof(List<Domain.Myfashion.Domain.FacebookAccount>)));
                //FacebookHelper fbhelper = new FacebookHelper();

                foreach (FacebookAccount itemFb in lstFacebookAccounts)
                {
                    //FacebookHelper objFbHelper = new FacebookHelper();
                    try
                    {
                        //Facebook profile data
                        if (!string.IsNullOrEmpty(itemFb.AccessToken))
                        {
                            Api.Facebook.Facebook ApiobjFacebook = new Api.Facebook.Facebook();
                            ret = ApiobjFacebook.GetFacebookData(itemFb.FbUserId, itemFb.UserId.ToString());
                        }

                    }
                    catch (Exception Err)
                    {
                        Console.Write(Err.Message);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            return ret;
        }
        public string GetData(object userId, string profileId)
        {
            string ret = string.Empty;

            try
            {
                Guid UserId = (Guid)userId;
                Api.FacebookFeed.FacebookFeed ApiObjFacebookFeed = new Api.FacebookFeed.FacebookFeed();
                ApiObjFacebookFeed.getAllFacebookFeedsByUserIdAndProfileId(userId.ToString(), profileId);
                Api.FacebookAccount.FacebookAccount            ApiObjFacebookAccount = new Api.FacebookAccount.FacebookAccount();
                List <Domain.Myfashion.Domain.FacebookAccount> lstFacebookAccounts   = (List <Domain.Myfashion.Domain.FacebookAccount>)(new JavaScriptSerializer().Deserialize(ApiObjFacebookAccount.GetFacebookAccountByUserId(UserId.ToString()), typeof(List <Domain.Myfashion.Domain.FacebookAccount>)));
                //FacebookHelper fbhelper = new FacebookHelper();

                foreach (FacebookAccount itemFb in lstFacebookAccounts)
                {
                    //FacebookHelper objFbHelper = new FacebookHelper();
                    try
                    {
                        //Facebook profile data
                        if (!string.IsNullOrEmpty(itemFb.AccessToken))
                        {
                            Api.Facebook.Facebook ApiobjFacebook = new Api.Facebook.Facebook();
                            ret = ApiobjFacebook.GetFacebookData(itemFb.FbUserId, itemFb.UserId.ToString());
                        }
                    }
                    catch (Exception Err)
                    {
                        Console.Write(Err.Message);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            return(ret);
        }
 private static string GetFbPageData(string ret, FacebookAccount itemFb)
 {
     Api.Facebook.Facebook ApiobjFacebook = new Api.Facebook.Facebook();
     ret = ApiobjFacebook.GetFacebookPageData(itemFb.FbUserId, itemFb.UserId.ToString());
     return(ret);
 }
 private static string GetFbPageData(string ret, FacebookAccount itemFb)
 {
     Api.Facebook.Facebook ApiobjFacebook = new Api.Facebook.Facebook();
     ret = ApiobjFacebook.GetFacebookPageData(itemFb.FbUserId, itemFb.UserId.ToString());
     return ret;
 }