I am experiencing a very strange error (could be a bug). I am trying to post a photo to a TEST USER. The first request I make goes through perfectly and the photo gets posted, but the 2nd, 3rd, etc. requests I make I get the following error:
“An unexpected error has occurred. Please retry your request later.”
It is important to note that this is only an issue with TEST USERS. Normal users work perfectly for any number of requests. It is also important to note that this worked perfectly with TEST USERS for multiple requests about a week or two ago.
I am using the PHP SDK and post the photo using the following code:
// Create tag array
$tagArray = array(array('tag_uid' => $posterUid, 'x' => 0, 'y' => 0));
// Post the photo
$fb->setFileUploadSupport(true);
return $fb->api(
"/$posterUid/photos",
'POST',
array(
'access_token' => $accessToken,
'message' => $message,
'source' => '@' . $source,
'tags' => $tagArray
)
);
I have tried posting different photos and also tried deleting and recreating TEST USERS, but the problem persists.
I had a similar problem and it was driving me crazy. I was finally able to get it to work by turning off ‘sandbox’ mode on my developer application.
I have no idea why this made a difference. But it fixed the problem for me. Hope this helps someone.