【问题标题】:share.php tag and facebbok [closed]share.php 标签和 facebook [关闭]
【发布时间】: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 我不可能有钥匙

【问题讨论】:

    标签: facebook meta


    【解决方案1】:

    不需要 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"/>
    

    【讨论】:

      猜你喜欢
      • 2014-08-10
      • 1970-01-01
      • 2018-04-03
      • 1970-01-01
      • 2019-05-16
      • 2013-02-06
      • 2014-03-20
      • 2011-01-27
      相关资源
      最近更新 更多