【发布时间】:2016-04-02 00:51:51
【问题描述】:
大家好,我使用 share.php
显然http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.site.com%2Fid.php%3Fid%3D13 到参考链接我放了适当的目的地,但在第一次点击 facebook 时并没有显示它的标题它的图像根据点击链接正在解决
ps 我不能用 api 我不可能有钥匙
【问题讨论】:
大家好,我使用 share.php
显然http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.site.com%2Fid.php%3Fid%3D13 到参考链接我放了适当的目的地,但在第一次点击 facebook 时并没有显示它的标题它的图像根据点击链接正在解决
ps 我不能用 api 我不可能有钥匙
【问题讨论】:
不需要 API 密钥,Facebook 使用 Open Graph 获取此数据,因此您真正需要做的就是将 og:meta 标签放入您共享页面的源 HTML:
<meta property="og:title" content="Title of content"/>
<meta property="og:type" content="Type of content"/>
<meta property="og:site_name" content="Your Site Name"/>
<meta property="fb:admins" content="YOUR_FACEBOOK_USER_ID"/>
<meta property="og:url" content="http://www.example.com/id.php?id=13"/>
<meta property="og:image" content="http://example.com/img/image.jpg"/>
<meta property="og:description" content="Description of this content"/>
【讨论】: