【问题标题】:og:title, description and imageog:标题、描述和图像
【发布时间】:2018-10-27 17:32:46
【问题描述】:

我目前正在为我的网站使用缩略图生成器,也许其他人可以使用它,所以它的作用是生成一个 html 文件,该文件会立即上传到 webhost,因此文件看起来像以下代码,但问题 Facebook 说他们没有检测到 og:标题、描述和图像......很奇怪,也许我做错了什么或者代码有误?

请注意,我使用 facebook 调试来抓取它并检查:https://developers.facebook.com/tools/debug/sharing/

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="ar" dir="rtl" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta property="fb:admins" content="John.Evenetcha"/>
<meta property="fb:app_id" content="2217370698541973"/>
<meta property="og:locale" content="ar_AR">
<title> تيار المحبة </title>
<meta name="description" content="القيادي بحزب تيار المحبة حسام الهمادي ينفي اشاعة التحالف مع نداء تونس ويصفها"> 
<meta name="Keywords" content="Tayar Al Mahaba" />
<meta property="article:author" content="https://www.facebook.com/John.Evenetcha" />
<meta property="article:publisher" content="https://www.facebook.com/John.Evenetcha" /> 
<meta property="og:type" content="article" />
<meta property="og:title" content="تيار المحبة"/>
<meta property="og:image" content="https://scontent.ftun2-1.fna.fbcdn.net/v/t1.0-9/44410830_2120345971363361_6384115955156385792_n.jpg?_nc_cat=111&_nc_ht=scontent.ftun2-1.fna&oh=246eea65cc7fddd40108f6bd8f840876&oe=5C52445D"/>
<meta property="og:site_name" content="تيار المحبة"/>
<meta property="og:description" content="القيادي بحزب تيار المحبة حسام الهمادي ينفي اشاعة التحالف مع نداء تونس ويصفها"/>
<meta http-equiv="REFRESH" content="0;url=https://tayar-al-mahaba.cf/TAM/news/view/9">
<BODY>
Redirecting...
</BODY>
</head>
</html>

【问题讨论】:

  • 你确定那些使用的字符是 UTF-8 支持的吗?
  • 我不确定:/这就是问题所在,实际上生成器是 vb.net 应用程序,我使用的是:System.Text.Encoding.Unicode
  • 解决了这个问题! HTML 很好,我刚刚删除了 system.text.encoding.unicode

标签: html facebook-graph-api


【解决方案1】:

解决了这个问题!问题是我使用 VB.NET 生成它,并在重写方法中得到了 System.Text.Encoding.Unicode,尽管这会让它变得很好:D

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多