当我尝试通过我的FBApp发布在墙上时,我收到此错误。在当地主机上一切都很好。这是我的代码示例。
$facebook = new Facebook(array(
'appId' => API_KEY,
'secret' => API_SECRET,
'cookie' => true,
));
$args = array(
'message' => $_SESSION['fields']['message'],
'name' => 'Look at POSTCARD',
'caption' => $context['ProjectName'],
'link' => $data['view_url']."&s=".$hash,
'description' => 'We are a lifestyle community with hotel services in the heart of San Francisco,check us out and ask a question.',
'picture' => $body_all["thumb"],
'actions' => array(array('name' => 'SEND A POSTCARD',
'link' => FACEBOOK_ACTION_URL."?next_postcard_id=".$postcard_id))
);
在此字符串处,异常PHP Fatal error: Uncaught OAuthException: (#100) link URL is not properly formatted
正在抛出
$post_fb_id = $facebook->api("/me/feed/", "post", $args);
答案 0 :(得分:-1)
使用ApacheHTTP客户端点击URL,问题是如果参数传递给 [link] 在点击URL之前被编码,您将获得错误代码:100
如果在HIT之前对URL进行编码,则必须确保参数 link 的值不会被编码并以相同的UTF格式传递。