Facebook与动态文本共享

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)

小智 1

如果您的网址“始终相同”,则目前无法通过共享器 API 实现这一点,并且请包含任何相关代码,因为我看不到您的“ine 是如何在 while 循环内从数据库获取结果”的。