Facebook graph api 在向我的网页发布链接时,如何告诉Facebook向用户提供哪些图片?

Facebook graph api 在向我的网页发布链接时,如何告诉Facebook向用户提供哪些图片?,facebook-graph-api,facebook,meta-tags,Facebook Graph Api,Facebook,Meta Tags,可能重复: 当用户发布我的网页链接并在Facebook上共享时,Facebook会扫描我的网页/站点,并提供在该页面中找到的一些图像。用户选择一个与fb post关联 我可以控制facebook在我的网页上为用户提供哪些图片供其在帖子中使用吗 一个看起来很接近的特性是开放图形标记,但它似乎不能满足我的特殊需要,因为它似乎只允许一个图像来表示该页面 是的,您可以通过生成一个“超级代理”来实现这一点,该代理将根据您的应用程序提供的动态信息创建facebook sharer所需的元数据,你可以在这个

可能重复:

当用户发布我的网页链接并在Facebook上共享时,Facebook会扫描我的网页/站点,并提供在该页面中找到的一些图像。用户选择一个与fb post关联

我可以控制facebook在我的网页上为用户提供哪些图片供其在帖子中使用吗


一个看起来很接近的特性是开放图形标记,但它似乎不能满足我的特殊需要,因为它似乎只允许一个图像来表示该页面

是的,您可以通过生成一个“超级代理”来实现这一点,该代理将根据您的应用程序提供的动态信息创建facebook sharer所需的元数据,你可以在这个链接上检查这一点:我创建了这个网站,因为所有的内容都来自一个页面来共享,每个项目都有一个自定义项目,我使用了深度链接技术,并将其发送到我的超级代理,该代理将静态内容生成到facebook sharer.php,下面是代码:

<?php
    // get our URL query parameters
    $current_path = 'http://' . dirname($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
    $title = $_GET['t'];
    $diet_id = $_GET['diet_id'];
    $desciption = $_GET['desc'];
    $image_thumb = $_GET['thumb'];
    $shared_url = $_GET['surl'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title><?php echo $title;?></title>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="title" content="<?php echo $title;?>" />
  <meta name="description" content="<?php echo $desciption;?>" />
   <meta http-equiv="refresh" content="1;URL=<?php echo $current_path . '/#diet_' . $diet_id; ?>" />
  <link rel="<?php echo $image_thumb; ?>" />
</head>
<body>
<img src="<?php echo $image_thumb; ?>" alt="<?php echo 'Imagen de ' . $title; ?>" width="112" height="112" style="visibility: hidden;"/>
</body>
</html>

“width=“112”height=“112”style=“可见性:隐藏;"/>
或者,你可能只想在facebook上添加一个可用图像列表,如下所示

<link rel="images/example_1.jpg" />
<link rel="images/example_2.jpg" />
<link rel="images/example_3.jpg" />
<link rel="images/example_4.jpg" />
<link rel="images/example_5.jpg" />


就在
标记内。记住这是由facebook sharer.php扫描的是的,您可以通过生成“超级代理”来完成“这将基于应用程序提供的动态信息创建facebook sharer所需的元数据,你可以在这个链接上检查这一点:我创建了这个网站,因为所有的内容都来自一个页面来共享,每个项目都有一个自定义项目,我使用了深度链接技术,并将其发送到我的超级代理,该代理将静态内容生成到facebook sharer.php,下面是代码:

<?php
    // get our URL query parameters
    $current_path = 'http://' . dirname($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
    $title = $_GET['t'];
    $diet_id = $_GET['diet_id'];
    $desciption = $_GET['desc'];
    $image_thumb = $_GET['thumb'];
    $shared_url = $_GET['surl'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title><?php echo $title;?></title>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="title" content="<?php echo $title;?>" />
  <meta name="description" content="<?php echo $desciption;?>" />
   <meta http-equiv="refresh" content="1;URL=<?php echo $current_path . '/#diet_' . $diet_id; ?>" />
  <link rel="<?php echo $image_thumb; ?>" />
</head>
<body>
<img src="<?php echo $image_thumb; ?>" alt="<?php echo 'Imagen de ' . $title; ?>" width="112" height="112" style="visibility: hidden;"/>
</body>
</html>

“width=“112”height=“112”style=“可见性:隐藏;"/>
或者,你可能只想在facebook上添加一个可用图像列表,如下所示

<link rel="images/example_1.jpg" />
<link rel="images/example_2.jpg" />
<link rel="images/example_3.jpg" />
<link rel="images/example_4.jpg" />
<link rel="images/example_5.jpg" />

就在
标记的内部。记住,这是由facebook sharr.php扫描的