2016-06-07 9 views

Antwort

0

Ja, Sie können eine Anfrage an die Graph API senden und das Feld instant_article des Objekts anfordern.

Zum Beispiel eine Anforderung für einen NYT Artikel würde folgendes Ergebnis zurück:

{ 
    "instant_article": { 
    "id": "1060796090661757" 
    }, 
    "id": "http://www.nytimes.com/2016/06/11/science/milky-way-light-pollution-dark-skies.html" 
} 

Der Antrag hierfür wäre:

GET https://graph.facebook.com/v2.6/?id=ARTICLE_URL&fields=instant_article&access_token=YOUR_ACCESS_TOKEN 
+0

ich eigentlich die gleiche Antwort von Graph API sowohl für Sofort und Nicht-Instant-Artikel. Anforderung: '? GET https://graph.facebook.com/v2.6/?fields=instant_article&id=http://www.businessinsider.com/apple-releases-swift-playgrounds-for-learning-code-2016 -6' (es ist ein Instant-Artikel) Antwort: '{ " id ":" http://www.businessinsider.com/apple-releases-swift-playgrounds-for-learning-code-2016-6 " } ' –

+0

Ich erhalte verschiedene Antworten. Zum Beispiel (mit Ihrer URL) https://developers.facebook.com/tools/explorer/?method=GET&path=%3Fid%3Dhttp%3A%2F%2Fwww.businessin%E2%80%8C%E2%80%8Bsider .com% 2Fapple-releases-swift-playgrounds-for-lernen-code-2016-6% 26fields% 3Dinstant_article & version = v2.6 - Dies gibt das IA-Feld zurück, also ist es eine IA. Wenn Sie das gleiche mit http://www.google.com als ID versuchen, wird das Feld nicht zurückgegeben === kein IA –