facebook中的奇怪字符发布到墙上

时间:2013-04-29 20:36:16

标签: php facebook facebook-graph-api

我有以下内容将文章发布到用户的Facebook Feed。我遇到的问题是标题被帖子中未包含的字符所包围:

{“O”:文章标题“}

php代码如下所示:

  $url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

  if (isset($_POST['publish'])){
       $comment = $_POST['comment'];
        try {
            $publishStream = $facebook->api("/$user/feed", 'post', array(
                'message' => "I found this and wanted to share it", 
                'link'    => $url,
                'picture' => 'http://domain/images/image1.jpg',
                'name'    => $item_title,
                'description'=> $comment
                )
            );
            //as $_GET['publish'] is set so remove it by redirecting user to the base url 
        } catch (FacebookApiException $e) {
            d($e);
        }

这是我假设的链接项有问题吗?我已将$ url变量从数据库记录更改为固定字符串,问题仍然存在。有什么想法吗?

0 个答案:

没有答案
相关问题