예제 #1
0
        public void Can_Upload_Status()
        {
            var service = new WeiboService(_consumerKey, _consumerSecret, _accessToken);

            var result = service.UploadImage("永恒万花Chrome~", @"C:\Documents and Settings\Administrator\桌面\chrome.png");

            Assert.IsNotNull(result);

            Console.WriteLine("Create at: {0} Screen name: {1} Text: {2} Id: {3}", result.CreatedAt, result.User.ScreenName, result.Text, result.Id);
            if (result.Annotations != null)
            {
                foreach (var annotation in result.Annotations)
                {
                    Console.WriteLine("Fid: {0}", annotation.Fid);
                }
            }

            if (result.Geo != null)
            {
                Console.WriteLine("Type: {0} Latitude: {1} Longitude: {2}", result.Geo.Type, result.Geo.Coordinates.Latitude, result.Geo.Coordinates.Longitude);
            }

            if (result.Visible != null)
            {
                Console.WriteLine("Type: {0} List id: {1}", result.Visible.Type, result.Visible.ListId);
            }
        }