Beispiel #1
0
 public Post(string id, User from, string message, string pictureUrl, int comment, int liked, DateTime dateTime)
 {
     this.id = id;
     this.from = from;
     this.message = message;
     this.pictureUrl = pictureUrl;
     this.comment = comment;
     this.liked = liked;
     this.dateTime = dateTime.ToString("dd/MM/yyyy HH:mm");
 }
Beispiel #2
0
 public Post(string id, User from, string message, string pictureUrl, int comment, int liked, string dateTime)
 {
     this.id = id;
     this.from = from;
     this.message = message;
     this.pictureUrl = pictureUrl;
     this.comment = comment;
     this.liked = liked;
     if (String.Compare(dateTime, "") == 0)
         this.dateTime = "";
     else
         this.dateTime = Post.convertDateTime(dateTime).ToString("dd/MM/yyyy HH:mm");
 }
Beispiel #3
0
        private User createUser(string id, string name, int comment, int liked, int post)
        {
            //var fbClient = new Facebook.FacebookClient();
            //fbClient.AccessToken = result.access_token;

            //string rq = id + "?fields=picture,link,name";
            //result = fbClient.Get(rq);//id of group

            //string name = result.name, link = result.link;
            ////rq = id + "?fields=picture";
            ////result = fbClient.Get(rq);
            //string url = result.picture.data.url;
            User tmp = null;
            //bool isContinute = true;
            tmp = new User(name, "https://www.facebook.com/" + id, "https://graph.facebook.com/" + id + "/picture", comment, liked, post);
            //foreach (var member in allMember.data)
            //{
            //    if (string.Compare(member.id, id) == 0)
            //    {
            //        tmp = new User(member.name, member.link, member.picture.data.url, comment, liked, post);
            //        break;
            //    }
            //}
            return tmp;
        }