Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为facebook的图像动态创建og标签_Facebook_Image_Tags_Facebook Opengraph - Fatal编程技术网

为facebook的图像动态创建og标签

为facebook的图像动态创建og标签,facebook,image,tags,facebook-opengraph,Facebook,Image,Tags,Facebook Opengraph,我需要从数据库中提取facebook将显示的图像 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta property="og:url" content="xxx/public/GigGuide2.asp?A=<%=iActName%>"/> <meta property="og:type" content="website"/> <me

我需要从数据库中提取facebook将显示的图像

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta property="og:url" content="xxx/public/GigGuide2.asp?A=<%=iActName%>"/>
<meta property="og:type" content="website"/>
<meta property="og:title" content="Live Gig Guide"/>
<meta property="og:image" content="<%=HiRes%>"/>
<meta property="og:site_name" content="MyEpod"/>
<meta property="og:description" content="Live Gig Guide"/>
这能做到吗?我做错了什么


Open Graph Object Debugger显示,除了图像标记外,我所有的标记都正确,我需要能够将act的照片与页面等一起显示出来。

og:image标记只能使用URL作为内容,请参阅

您需要创建一个单独的脚本,例如

<meta property="og:image" content="xxx/public/ActImage.asp?A=<%=iActName%>"/>
ActImage.asp脚本将从数据库中提取图像并设置正确的标题等。由于您尚未给出图像如何存储在数据库中的任何详细信息,这是我能给出的最详细的答案。

有什么问题?