简体   繁体   中英

Facebook Graph API URL Scrape Inconsistent

I am running queries against Facebook Graph API to fetch OG meta information about URLs. Using a Facebook APP token, I can request most URLs and get their corresponding meta data back. But I have run into two issues that I can't find a solution for. I have one domain that refuses to pull any meta information using an APP token. Instead I get back an error 100 (Unsupported post request). But when I make the same request using a User Access Token, it works correctly. The second issue I found is that when a URL has any kind of OG error, Facebook is still scraping it, but will return a 100 error instead of returning the meta details (with both the app token and the user access token). I've even tried running the query without the scrape parameter, to no avail.

Normal Request That Returns Meta Fields of URL:

POST: 
    https://graph.facebook.com/v2.9/
    {
        "id": "http://viralcrunch.com/articles/22325/these-guys-invented-the-anti-smart-phone-and-it-will-blow-your-mind",
        "scrape": "true"
    }

Request That Returns 100 Unsupported post request Error W/ App Token

POST: 
    https://graph.facebook.com/v2.9/
    {
        "id": "http://turnthispage.com/dads-totally-winning-fatherhood/",
        "scrape": "true"
    }

Request That Returns 100 Invalid Object Error W/ Any Token

POST: 
    https://graph.facebook.com/v2.9/
    {
        "id": "http://www.thesportster.com/basketball/top-20-nba-players-who-live-life-to-the-fullest/",
        "scrape": "true"
    }

The second URL seems to be associated with an app id of an app that has some kind of access restrictions set; so I guess it is the same here as if you tried to access information about a Facebook Page that has access restrictions set - you can not query any details about those using the app access token, you need to use a user access token for a user that is allowed to see the content, or a page access token for that page.

And that you get an error response for the third one seems only natural. After all, this is a tool intended to debug and scrape the Open Graph objects you are in control of, so if the OG meta data is not in order it should return an error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM