【问题标题】:Facebook instant article - Multiple url to same articleFacebook 即时文章 - 同一篇文章的多个网址
【发布时间】:2019-10-18 05:24:59
【问题描述】:

我在 facebook 即时文章中有一个 rel=canonical 链接

www.domain.com?p=news&newsid=10

但是当有人使用另一个 ref 参数访问下面的链接时,它无法阅读 facebook 即时文章并成为网页,因为链接不同。

www.domain.com?p=news&newsid=10&ref=1
www.domain.com?p=news&newsid=10&ref=2
www.domain.com?p=news&newsid=10&ref=3

知道如何开发一篇具有多个链接的文章吗?

【问题讨论】:

    标签: url-parameters facebook-instant-articles


    【解决方案1】:

    来自 Instant Articles 团队。

    作为 Instant Article 提取器,我们拥有的关键是规范 URL 字段。 对于您的情况,您应该呈现同一篇文章的所有链接以及所有具有以下 URL 作为关键规范的响应:

    www.domain.com?p=news&newsid=10

    这样,您可以为任何人在 Facebook 新闻提要中分享的任何 ref=** 查询参数呈现相同的即时文章。

    您还可以在 op-tracker 标签上添加这些字段,以更好地跟踪您的内容,甚至是共享的原始 URL,为了更好地跟踪,请查看以下示例,摘自 this documentation

    <figure class="op-tracker">
        <iframe>
            <script>
                // The URL the user shared
                // (if there are no redirections, otherwise the final URL in the chain)
                var urlSharedByUser = ia_document.shareURL;
    
                // The article title
                var title = ia_document.title;
    
                // Referrer is always set to 'ia.facebook.com'
                var referrer = ia_document.referrer;
            </script>
        </iframe>
    </figure>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-03-31
      • 1970-01-01
      • 2015-05-01
      • 1970-01-01
      • 2014-09-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多