简体   繁体   English

在Facebook用户墙上张贴“未知错误”

[英]Post on Facebook user wall “Unknown error”

I've authenticated the user with the following scope: email,publish_actions, publish_stream and try to post on the users wall with the following code: 我已经在以下范围内对用户进行了身份验证: email,publish_actions, publish_stream并尝试使用以下代码在用户墙上发布:

try {
   $ret_obj = $facebook->api('/me/feed', 'POST',
       array(
        'access_token' => $accessToken,
        'link' => 'https://testing.com',
        'message' => 'Testing'
      ) 
   );
}catch(FacebookApiException $e) {
   print_r($e);
   exit;
};

I'm just getting this error 我刚收到这个错误

Unexpected error has occurred - please try again later 发生意外错误-请稍后再试

Any idea what I'm doing wrong? 知道我在做什么错吗?

The code seems fine, I tried and it working, it's just that- try some link other than https://testing.com ; 该代码似乎很好,我尝试并且可以正常工作,只是尝试-尝试使用https://testing.com以外的其他链接; the link must be valid. 链接必须有效。

Sorry I don't have enough credit to just comment - 抱歉,我没有足够的信誉来发表评论-

This Error has occured to me before. 我之前曾发生过此错误。 The Facebook API will check if this link is a "spam" or published previously (ie repeating posts of the same URL even if the user published them manually), the API will reject the call. Facebook API将检查此链接是“垃圾邮件”还是以前发布的(即,即使用户手动发布了相同URL的帖子,也重复发送),API会拒绝调用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM