Reputation: 1
I am triying post a instant article with facebook graph api. I have done this steps: 1- Get page access token which have necessary permissions 2- Claim my website´s URL. This website´s url was accepted by Facebook 3- In graph API I post, with page access token not expired
{page-id}/instant_articles?development_mode=true&html_source=<html lang="en" prefix="op: http://media.facebook.com/op#"><head><meta charset="utf-8"><link rel="canonical" href="http://{websites´s URL}/instantarticle.html"><link rel="stylesheet" title="default" href="#"><title>Instant Articles</title><meta property="fb:article_style" content="Test Article Style"></head><body><article><header><h1> Instant Articles </h1><h2>Get familiar with your new storytelling tools. Make your media come alive, and keep readers coming back for more</h2><h3 class="op-kicker">Introduction</h3><address>Instant Articles Team</address><time class="op-published" dateTime="2016-2-04T08:00">February 4th 2016, 8:00 AM</time><time class="op-modified" dateTime="2016-2-04T08:00">February 4th 2016, 8:00 AM</time></header><p>Yes, it’s true. Instant Articles open on mobile devices really quickly.</p></body></html>
4- I get a response Id. When I visite this ID, graph api shows
"message": "Missing Article's Canonical URL: There is no URL specified for this article. A canonical URL needs to be claimed and placed within the HTML to generate an Instant Article. Refer to URLs under Publishing Articles in the Instant Articles documentation for more information on claiming and inserting a canonical URL."
I don´t undesrtand what is the problem? Any idea?
Thanks!!!
Upvotes: 0
Views: 2945
Reputation: 1
I was sending a html source incorrect. I have checked my source with facebook developer settings and I have made a instant article with him. But I post the same source with graph api and I get the same error.
The new source is this
{page-id}/instant_articles?development_mode=true&html_source=<!doctype html><html lang="en" prefix="op: http://media.facebook.com/op#"><head><meta charset="utf-8"><link rel="canonical" href="http://{canonical_url}/instantarticle.html"><meta property="op:markup_version" content="v1.0"></head><body><article><header><h1>Segundo articulo instantaneo</h1><h2>Article Subtitle</h2><time class="op-published" datetime="2014-11-11T04:44:16Z">November 11th, 4:44 PM</time><time class="op-modified" dateTime="2014-12-11T04:44:16Z">December 11th, 4:44 PM</time><address <a rel="facebook" href="https://www.facebook.com/Epfake/">EP Fake</a>EuropaPress Fake</address><address><a>TR Vishwanath</a>Vish is a scholar and a gentleman.</address><h3 class="op-kicker">This is a kicker</h3></header><p> Article content </p><footer><aside>Acknowledgements</aside><small>Legal notes</small></footer></article></body></html>
Thanks!! I hope your help
Upvotes: 0