I am looking for the reason for occasional FQL failure. Our script will run smoothly most of the time but occasionally it will fail for anywhere from several minutes to several hours producing the following error message:
Exception: 601: Parser error: unexpected ‘ORDER’ at position 70
I have attempted on numerous occasions to remove the ORDER BY clause from my queries in hopes that the FQL could then process in Facebook. This has always resulted in yet another failure; typically, giving an error that states “Unexpected End of Query”.
Any insight will be much appreciated!
Example query:
SELECT aid, object_id, created, description FROM album WHERE owner = $pageID ORDER BY created DESC LIMIT 36
Seems that your query miss substitution for
$pageIDbecause it’s empty. That exception will occur in that case.$pageIDisn’t empty before running queryWHERE owner = '$pageID' ORDER BY created) so query will not fail even if$pageIDis empty (it’ll just return empty results)