示例#1
0
        public string getCoverFromUID(string id)
        {
            string result = "";

            try
            {
                result = "https://scontent.fhan2-3.fna.fbcdn.net/v/t1.0-9/32745701_185070642317166_8489549919118426112_o.jpg?_nc_cat=0&oh=667a1c63038f25b1df047b4cb718eb1b&oe=5B9A1956";
                string url  = "https://graph.facebook.com/" + id + "?fields=cover&access_token=EAAAAUaZA8jlABADwyrLfvkvXd2yDc6D2WUtGpHcuiPHchQrlqfa42J8F0ZCSF9JRbfFZCqnZCnry0KrgZAkifBorlroe9YOdzoO7kRZBJWuRddytzag9RKHJAtYMAdP3KqVWXuMabMNVNHhZCo4AiKvOLxbLNJ3UaLjHJAo7LZBVEtns5NNVALEu";
                string html = http.Get(url).ToString();
                Clipboard.SetText(html);
                CoverWallpaper cw = new CoverWallpaper();
                //Newtonsoft.Json.JsonConvert.PopulateObject(html, cw);
                JsonConvert.PopulateObject(html, cw);
                return(result = cw.cover["source"]);
            }
            catch (Exception ex)
            {
                ex.Message.ToString();
            }

            // MessageBox.Show(result);
            return(result);
        }
示例#2
0
        public string getCoverFromUID(string id)
        {
            string result = "https://scontent.fhan2-3.fna.fbcdn.net/v/t1.0-9/32745701_185070642317166_8489549919118426112_o.jpg?_nc_cat=0&oh=667a1c63038f25b1df047b4cb718eb1b&oe=5B9A1956";
            string url    = "https://graph.facebook.com/" + id + "?fields=cover&access_token=EAAAAUaZA8jlABAEqjLKxaG4NCHDM9biCFxwP7EkmGesZA1LQlrZCaKcB2ELMGBOGRDvIQ1IGyUCtIQESUhZC1sdusUuIGINVrRW00rrXmSDlNi805T9X4AcaFtvbbqUcOu9DgZCs1QydE7ODeLTq2kgZBUiiyim8ZCq063dtW7pCwZDZD";
            string html   = http.Get(url).ToString();

            Clipboard.SetText(html);
            CoverWallpaper cw = new CoverWallpaper();

            //Newtonsoft.Json.JsonConvert.PopulateObject(html, cw);
            JsonConvert.PopulateObject(html, cw);
            try
            {
                return(result = cw.cover["source"]);
            }
            catch (Exception ex)
            {
                ex.Message.ToString();
            }

            // MessageBox.Show(result);
            return(result);
        }