facebook动态元标记与PHP

时间:2013-11-27 11:32:20

标签: php html facebook facebook-graph-api

我在提交表单后生成动态facebook元标记时遇到问题。我有一个共享按钮,它应该获得我在链接中提供的参数,这是代码:

目:

if(isset($_POST['confirm']))
{
$lock=$_POST['lock'];
$love_letter=$_POST['love'];
}
echo'
<meta property="og:url" content="http://websoftit.ro/lackoflove/registration.php?type=1&love='.$love_letter.'&lock_type='.$lock.'"> 
<meta property="og:title" content="Lock of Love">
<meta property="og:description" content="You have created your own virtual love lock! Why not share with your friends on facebook?
        Your love lock link is: '.$lock.'">
<meta property="og:image" content="http://websoftit.ro/lackoflove/images/lovelock/biglock'.$lock.'.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="200">
<meta property="og:image:height" content="200">
';

现在提交后的代码

if(isset($_POST['confirm']))
{
$name=$_POST['name'];
$email=$_POST['email'];
$country=$_POST['country'];
$city=$_POST['city'];
$type=$_POST['type'];
$lock=$_POST['lock'];
$love_letter=$_POST['love'];
$cookie=$_COOKIE['cookie'];

<div class="fb-share-button" data-href="http://websoftit.ro/lackoflove/registration.php?type=1&love='.$love_letter.'&lock_type='.$lock.'" data-type="button_count"></div>

}

问题在于,当我按下分享按钮时,它没有从描述和图像中获取love_letter和lock_type的参数,它几个月前在链接中使用了php变量,但似乎他们改变了一些东西

0 个答案:

没有答案