在我的网站上有购物车。如果购物车包含4个产品,那么将立即在Facebook上分享4个图像。
现在正在使用以下代码,但它无法正常工作
<?php
$facebook = "http://www.facebook.com/sharer.php?u=http://server.ashoresystems.com/~crookedt/index.php?option=com_easydiscuss&view=post";
?>
请帮我解决这个问题。
这是我的代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml">
<?php
$title=urlencode('Title of Your iFrame Tab');
//$url=urlencode('http://www.facebook.com/yourfanpage');
$url=urlencode('http://www.kokopame.com');
$summary=urlencode('Custom message that summarizes what your tab is about, or just a simple message to tell people to check out your tab.');
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Kokopame</title>
<meta property="og:title" content="Title of Your iFrame Tab"/>
<meta property="og:description" content="Custom message that summarizes what your tab is about, to tell people to check out your tab."/>
<link rel="image_src" href="http://www.decibio.com/store/report_icon/medium/1375336395_Rx Tools report icon.jpg" />
<link rel="image_src" href="http://www.decibio.com/store/report_icon/medium/1370905582_NGS.jpg" />
</head>
<body>
<?php $url = urlencode('http://www.kokopame.com/test_share_images.php'); ?>
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $url;?>" target="_blank" >Share Metadata Example111</a><br/>
<?php //echo file_get_contents('https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.kokopame.com%2Ftest_share_images.php');?>
</body>
</html>
谢谢,
标记
答案 0 :(得分:0)
您可以使用Facebook的Photos API
在用户的相册上发布照片。
所需权限:publish_stream
,user_photos
API:\POST
/photos
包含所需的参数(图片,名称等)。
有关详情,请访问:Photo