0

我正在尝试使用以下代码在 Facebook 墙上发帖。该消息有时包含在墙上转换的双引号或其他字符,不知道如何解决这个问题。以下是我正在使用的代码

更新

$title = get_the_title($post->ID); // using wordpress posts' title

//$title = "John's message has \"\" double quotes"; I thought it might be facebook doing something with the title. but by using raw according to Tim, it worked.

                    $attachment = array(
                        'access_token' => $smm_fb_access_token,
                        'message' => $title,
                        'name' => "Site.com",
                        'link' => $handler_url,
                    );

                    $facebook->api(sprintf('/%s/feed', $fb_id), 'POST', $attachment);

Facebook上的帖子变成了这样

John’s message has ““ double quotes.

请指导我应该怎么做才能使它工作?

4

1 回答 1

0
于 2013-07-10T08:59:57.910 回答