I am trying to get user's posts for the last 2 years using the valid token and the following link:
me/feed?fields=id,created_time,from,icon,is_hidden,message,message_tags,parent_id,permalink_url,picture,privacy,status_type,**story**,to,updated_time,comments.limit(0).summary(true),attachments{description,media{source,image{height,src,width}},target{id,url},title,type,url,subattachments},shares&limit=25&since=-2 years
I can retrieve most of the pages, however, sometimes I get the errors like this
{
"error": {
"message": "(#2) Service temporarily unavailable",
"type": "OAuthException",
"is_transient": true,
"code": 2,
"fbtrace_id": "AybmxKTaLwxa7L99QjcBpn0"
}
}
Turns out that the field story caused the problem. If it is removed from the link when getting a particular page, the request succeeds. So, the problem is apparently not in the code or the request, but on the Facebook side. However, we need this field. moreover, I can get the data with the story field in most cases, not in all though for some reason. Permissions are presumably ok because I am able to get most of the pages.
I am using restFB library to make requests, but I am able to reproduce the problem through Graph API Explorer
Is there a workaround to avoid this exception and keep the story field in the request and should this be reported as a bug?