use*_*027 5 php facebook dynamic-text
我正在做:
$fb = "http://www.facebook.com/sharer.php?t=".$title."&u=".$url;
Run Code Online (Sandbox Code Playgroud)
该行在while循环中获取数据库的结果.$ url始终是相同的,但$ title会根据行而更改.
现在我构建链接,当我点击它们时,它们总是显示在我的墙上
<meta name="title" content=''>
Run Code Online (Sandbox Code Playgroud)
我的主页上的文字而不是$ title文字.
我该怎么做才能解决这个问题并分享$ title中包含的文字?
这里的代码我正在尝试og.点击链接后,我的Wall中的共享文本是"Google",而不是我的变量中的内容:
<?php
$tt = "Some text in the meta";
$url_p = "http://www.google.com";
$url = urlencode($url_p);
$text = "Text I want to show";
$title = urlencode($text);
$fb = "http://www.facebook.com/sharer.php?t=".$title."&u=".$url;
?>
<meta property="og:title" content="<?php echo $tt; ?>"/>
<a href="<?php echo $fb; ?>">share link</a>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
12887 次 |
| 最近记录: |