internal static List <FBUser.Post> SetPosts(ref FBUser.FBUser i_UserAsRef, FacebookObjectCollection <Post> i_Posts, Image i_UserPhoto, string i_UserName) { List <FBUser.Post> posts = new List <FBUser.Post>(); foreach (Post post in i_Posts) { posts.Add(new FBUser.Post(i_UserAsRef, post.Caption, post.Description, post.CreatedTime, ServerUtils.RandomAmountOf(), ServerUtils.RandomAmountOf(), i_UserPhoto, post.PictureURL)); } return(posts); }
internal static List <FBUser.Group> SetGroups(FacebookObjectCollection <Group> i_Groups) { List <FBUser.Group> groups = new List <FBUser.Group>(); foreach (Group group in i_Groups) { List <FBUser.Post> groupPosts = new List <FBUser.Post>(); foreach (Post groupPost in group.WallPosts) { groupPosts.Add(new FBUser.Post(new FBUser.FBUser(groupPost.From.Id), groupPost.Caption, groupPost.Description, groupPost.CreatedTime, ServerUtils.RandomAmountOf(), ServerUtils.RandomAmountOf(), group.ImageSmall, groupPost.PictureURL)); } groups.Add(new FBUser.Group(group.Name, groupPosts)); } return(groups); }