Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6020261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:32:33+00:00 2026-05-23T03:32:33+00:00

I need help to pull RSS feeds from a facebook page I’m using the

  • 0

I need help to pull RSS feeds from a facebook page I’m using the following code but it keeps giving me an error :

string url = 
    "https://www.facebook.com/feeds/page.php?id=40796308305&format=rss20";

XmlReaderSettings settings = 
    new XmlReaderSettings
                    {
                         XmlResolver = null,
                         DtdProcessing=DtdProcessing.Parse,

                     }; 
XmlReader reader = XmlReader.Create(url,settings);

SyndicationFeed feed = SyndicationFeed.Load(reader);

foreach (var item in feed.Items)
{
    Console.WriteLine(item.Id);
    Console.WriteLine(item.Title.Text);
    Console.WriteLine(item.Summary.Text);

}

if (reader != null) reader.Close();

This code works perfectly with any blog or page rss but with Facebook rss it give an exception with the following message

The element with name ‘html’ and namespace ‘http://www.w3.org/1999/xhtml’ is not an allowed feed format.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:32:34+00:00Added an answer on May 23, 2026 at 3:32 am

    Facebook will return HTML in this instance because it doesn’t like the User Agent supplied by XmlReader. Since you can’t customize it, you will need a different solution to grab the feed. This should solve your problem:

    var req = (HttpWebRequest)WebRequest.Create(url);
    req.Method = "GET";
    req.UserAgent = "Fiddler";
    
    var rep = req.GetResponse();
    var reader = XmlReader.Create(rep.GetResponseStream());
    
    SyndicationFeed feed = SyndicationFeed.Load(reader);
    

    This is strictly a behavior of Facebook, but the proposed change should work equally well for other sites that are okay with your current implementation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need help on this following aspx code aspx Code: <asp:Label ID =lblName runat
Ok need some help here. I have an autocomplete setup to pull from a
i need help with disk_total_space function.. i have this on my code <?php $sql=select
I need a bit of inspiration from somewhere and hoping someone, anyone could help.
I have two strings that I need to pull data out of but can't
I need help figuring out how to convert data that comes in from a
I need to pull some data from the API. It returns the GET in
I have a few challenges I need help on. I need to pull data
I need help pulling URLs from Google search results and was told to use
I need some help pulling cell data from table when a user clicks the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.