2

我们正在开发一个具有 Facebook 分享功能的 iOS 应用程序。除 Applinks 外,一切正常。我们正在生成具有指定内容(包括打开的图元标记)的 url 链接“应用程序页面”,并且我们希望此内容在我们的 iOS 应用程序中直接显示给用户。

问题是,尽管 Facebook iOS 应用程序在大多数情况下确实从共享链接中提取 Applinks 元标记,但当我进一步调查时,我发现 Facebook 无法完全处理使用 iOS Facebook 共享的链接分享功能。

当我再次强制 Facebook 从链接中抓取信息时,它总是成功的!什么都没有改变,服务器提供相同的内容。这使我找到了一种解决方案,该解决方案涉及在每次共享链接时强制 Facebook 更新信息。我们希望避免发送重复请求。

我在 Stackoverflow 上发现了几篇有类似问题的帖子,但没有一个解决方案适合我们。共享链接是公开可用的,不需要用户登录。安全或非安全访问也会出现同样的问题。链接指向静态页面(无 javascript)。页面非常小(小于 2KB)。

更新(添加示例元标记)

<!DOCTYPE html>
<html lang="en">
        <head>
                <title>Title</title>
                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
                <meta property="al:ios:url" content="appscheme://applink/rodjs2kd48">
                <meta property="al:ios:app_store_id" content="123456">
                <meta property="al:ios:app_name" content="AppName">
                <meta property="al:web:url" content="https://example.com/rodjs2kd48">
                <link rel="canonical" href="https://example.com/rodjs2kd48">
                <meta property="og:url" content="https://example.com/rodjs2kd48">
                <meta property="og:type" content="article">
                <meta name="twitter:card" content="summary">
                <meta property="og:title" content="Title">
                <meta name="twitter:title" content="Title">
                <meta property="og:image" content="http://example.com/image.jpg">
                <meta name="twitter:image" content="http://example.com/image.jpg">
                <meta property="og:description" content="Description">
            <meta name="twitter:description" content="Description">
        </head>
        <body>
                Some content
        </body>
</html>
4

0 回答 0