Facebook分享未读取任何meta og标签

时间:2018-09-26 15:54:28

标签: javascript html facebook share

我的Facebook分享未读取我的任何元标记。缺少以下必需属性:og:url,og:type,og:title,og:image,og:description,fb:app_id。

<script type="text/javascript">
    window.fbAsyncInit = function () {
        FB.init({
            appId: '924796707731406',
            autoLogAppEvents: true,
            xfbml: true,
            version: 'v3.1'
        });
    };

    (function (d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.1';
        fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));
</script>

<meta property="og:image" content="https://@Context.Request.Host/img/OppaFb.png" />
<meta property="og:image:width" content="1200px" />
<meta property="og:image:height" content="630px" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:title" content="OPPA - უნივერსალური ელექტრონული საფულე" />
<meta property="og:description" content="ოპპა  ფულის მარტივად მართვაში გეხმარება. საიმედოდ დაცულ სივრცეში შეგიძლია გადაიხადო, გადარიცხო და დააგროვო ფული" />
<meta charset="utf-8" />
<meta property="fb:app_id" content="924796707731406"/>

<script>
document.getElementById('piggy-bank-fb-shear-btn').onclick = function () {
    FB.ui({
        method: 'share',
        display: 'popup',
        app_id: '924796707731406',
        href: window.fbSheareUrl,
    }, function (response) { });
}</script>

1 个答案:

答案 0 :(得分:0)

尝试使用Facebook的“共享调试器” here

如果我是正确的话,这是针对 www.oppa.ge 网站的。通过使用调试器并查看url上的html,似乎这些标签丢失了……

og:urlog:typefb:app_id

Results here

这也可能是由于您在Facebook上的应用被“错误配置”了。

我收到此错误

  

配置错误的应用

     

对不起,oppa共享尚未获准在App Center中显示。

执行以下操作

  1. 转到https://graph.facebook.com/{APP_ID_HERE}https://graph.facebook.com/924796707731406
  2. 遵循JSON(https://www.facebook.com/games/?app_id=924796707731406)中的“链接”属性