我的應用程序需要從URL獲取數據facebook報廢。到現在爲止,我們使用使用url可靠地獲取來自Facebook圖表api的報廢數據
POST /?id={object-instance-id or object-url}&scrape=true
這是在https://developers.facebook.com/docs/sharing/opengraph/using-objects
更新對象部分例如
POST /?id=http://google.com
{
"url": "http://www.google.com/",
"type": "website",
"title": "Google",
"image": [
{
"url": "http://www.google.com/images/branding/googleg/1x/googleg_standard_color_128dp.png"
}
],
"description": "Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.",
"updated_time": "2015-10-06T11:34:58+0000",
"id": "381702034999"
}
通知圖像部分中詳細描述得到它。
不幸的是如果OG標籤服務器
POST /?id=http://some.page.with.bad.tags.com
{
"error": {
"message": "Invalid parameter",
"type": "FacebookApiException",
"code": 100,
"error_subcode": 1611016,
"is_transient": false,
"error_user_title": "Object Invalid Value",
"error_user_msg": "Object at URL 'http://some.page.with.bad.tags' of type '' is invalid because the given value '/some-bad-value' for property 'og:url' could not be parsed as type 'url'.",
"fbtrace_id": "abcabcabc"
}
}
它返回什麼有趣的錯誤配置。
嘗試獲取URL返回此:
{
"og_object": {
"id": "381702034999",
"description": "Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.",
"title": "Google",
"type": "website",
"updated_time": "2015-10-06T11:40:04+0000",
"url": "http://www.google.com/"
},
"share": {
"comment_count": 2,
"share_count": 13494003
},
"id": "http://www.google.com"
}
哪個錯過圖像部分。在文檔中找不到使用POST /?id = {url}的圖像檢索結果的任何方式,但在og標記中出現任何錯誤時都失敗。
GET /{ObjectId}
只返回類型和CREATED_TIME
進入頁面https://developers.facebook.com/tools/debug/結果相同斷鏈其中包含的頁面圖片,說明,標題和字幕。我需要哪些。所以這意味着facebook存儲他們,即使頁面有錯誤的標籤,但我需要一種方法來獲取它們。不幸的是,我無法提供由於NDA導致網址損壞的鏈接,我無法找到其他帶有損壞標籤的網頁。
沒有其他方式通過API獲取該信息。 – CBroe