Exemplo n.º 1
0
        public void Can_Get_Home_Timeline()
        {
            var service = new WeiboService(_consumerKey, _consumerSecret, _accessToken);
            var result  = service.ListWeibosOnFriendsTimeline();

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

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

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

            Console.WriteLine("HasVisual: {0} Previous cursor: {1} Next cursor: {2} Total number: {3}", result.HasVisible, result.PreviousCursor, result.NextCursor, result.TotalNumbe);
        }