【发布时间】:2011-12-31 17:25:24
【问题描述】:
我一直在为朋友开发一个网站,并尝试将其与 facebook 集成。他是一名半专业摄影师,为婚礼等拍摄照片。作为其中的一部分,我必须集成一些安全系统,该系统使用脚本来获取图像,而不是通过链接直接访问它们。该脚本获取照片 ID 和请求的尺寸(全尺寸或缩略图),检查数据库以查看它是否可公开访问,并将图像读取到浏览器(使用 header() 更改 mime 类型)。但是,当我在 og:image 设置为此照片检索脚本的页面上使用“喜欢”按钮时,facebook 不会显示图像。我猜这与 facebook 用来在页面上加载图像的“safe_image.php”脚本有关。有谁知道解决这个问题的方法吗?
这是我试图在提要中显示的页面的 og 标记,以防我做错了什么:
<meta property="og:title" content="Wedding Samples"/>
<meta property="og:type" content="article"/>
<meta property="og:image" content="http://www.thevandykecollection.com/index.php?f=viewphoto&id=289&thumbnail"/>
<meta property="og:url" content="http://www.thevandykecollection.com/index.php?f=portfolio&id=23"/>
<meta property="og:site_name" content="The Van Dyke Collection"/>
<meta property="fb:admins" content="510746110,500416148"/>
【问题讨论】:
标签: php image facebook-like facebook-opengraph