缺少文章的Cannonical URL with Facebook Graph API



我正在尝试用facebook图形api发布一篇即时文章。我已经完成了以下步骤:1-获取具有必要权限的页面访问令牌2-声明我的网站的URL。此网站的url已被Facebook接受3-在图API I帖子中,页面访问令牌未过期

{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-我得到一个响应Id。当我访问这个Id时,图形api显示

"message":"缺少文章的规范URL:没有为此文章指定URL。需要声明规范URL并将其放置在HTML中才能生成即时文章。有关声明和插入规范URL的详细信息,请参阅即时文章文档中"发布文章"下的URL。"

我不知道问题出在哪里?知道吗?

谢谢!!!

我发送的html源不正确。我已经用facebook开发者设置检查了我的来源,我已经和他一起做了一篇即时文章。但是我用图形api发布了相同的源代码,我得到了相同的错误。

新的来源是这个

{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>

谢谢!!我希望你能帮助

相关内容

  • 没有找到相关文章

最新更新