質問

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:

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?

役に立ちましたか?

解決 2

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 (i.e. repeating posts of the same URL even if the user published them manually), the API will reject the call.

他のヒント

The code seems fine, I tried and it working, it's just that- try some link other than https://testing.com; the link must be valid.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top