Search code examples
facebookscraper

Facebook scraper error reading contents


Facebook scraper throws some weird stuff when reading the contents of my page...

Page URL: http://www.protagora.hr/Stranica/O-nama/9/

Scrape debug output: https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.protagora.hr%2FStranica%2FO-nama%2F9%2F

Why when I access the page with my browser everything is alright, but scraper could not access the same data?

Help please.


Solution

  • When I first tried to access your page I got a php error instead of the page, I then refreshed the browser and the error disappeared and the page was loaded.

    Then I tried to see what the debugger says, and you're right, it complains (with warnings not errors) about not having the following tags: title, url and description, even though when viewing your source it's clear that all tags are present.

    At the bottom of the debugger result page there's a link "Scraped URL: See exactly what our scraper sees for your URL", when clicking that the content that the facebook scraper gets was:

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <br><b>Fatal error</b>
    </head>
    <body><p>:  Call to a member function LoadContentData() on a non-object in <b>/home/protagor/public_html/WebSuite/Modules/WebCMS/Classes/Content.php</b> on line <b>65</b><br></p></body>
    </html>
    

    which is the error I saw at first.

    I'm not sure if they just cached this error or if this error occurs only when the facebook bot scrapes your page. Usually using the debugger "forces" the facebook cache to be cleared and the new result is replacing the old in the cache.

    You should check why this error occurs.