Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
C# / VB.NET - C# - Problema con feed reader (xml serialization)
Forum - C# / VB.NET - C# - Problema con feed reader (xml serialization)

Avatar
Rex Romae (Ex-Member)
Newbie


Messaggi: 3
Iscritto: 11/10/2008

Segnala al moderatore
Postato alle 13:09
Domenica, 28/03/2010
Salve, volevo implementare un feed reader delle notifiche di FB. Ogni profilo ha il suo feed rss, il mio link ad esempio è il seguente:

http://www.facebook.com/feeds/notifications.php?id=1500312 ...

Ora, il mio codice è questo

Codice sorgente - presumibilmente C#

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Xml;
  6.  
  7. namespace FeedReader
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             XmlTextReader rssReader;
  14.             XmlDocument rssDoc;
  15.  
  16.             string url = "http://www.facebook.com/feeds/notifications.php?id=1500312779&viewer=1500312779&key=bd0e65f5d9&format=rss20";
  17.  
  18.             rssReader = new XmlTextReader(url);
  19.             rssDoc = new XmlDocument();
  20.             rssDoc.Load(rssReader);
  21.  
  22.             Console.WriteLine("" + rssDoc.InnerText);
  23.  
  24.             Console.ReadKey();          
  25.         }
  26.     }
  27. }



Purtroppo mi dice che il reader (rssReader) è nullo perchè non riesce a leggerlo, se invece metto un altro link di feed rss lo legge e lo stampa. Perchèèèè?

PM Quote