MatheusJardimB
MatheusJardimB

Reputation: 3677

FQL query error: "An unknown error has occurred."

I've started facing some problems with Facebook FQL without any change to my code. And they're also getting solved without any change! I'm receiving this annoying message that has no clear indication of the problem and possible solutions.

{
   "error": {
      "message": "An unknown error has occurred.",
      "type": "OAuthException",
      "code": 1
   }
}

I've been using FB-SDK for Android and changed it to parse content from url (GET) and the problem still existing. I'm trying to trigger this simple query (that works in the Graph API Explorer).

SELECT name,price_range,type,location,page_id FROM page WHERE page_id in (SELECT page_id,latitude,longitude FROM place WHERE distance(latitude, longitude, '-30.03852', '-51.17877') < 50000 LIMIT 20) AND (type='RESTAURANT/CAFE' OR type='LOCAL BUSINESS')

The url used is the following

https://graph.facebook.com/fql?q=SELECT name,price_range,type,location,page_id FROM page WHERE page_id in (SELECT page_id,latitude,longitude FROM place WHERE distance(latitude, longitude, '-30.03852', '-51.17877') < 50000 LIMIT 20) AND (type='RESTAURANT/CAFE' OR type='LOCAL BUSINESS')&access_token=ACCESS_TOKEN

Any help??

Upvotes: 2

Views: 622

Answers (1)

Sunny
Sunny

Reputation: 14808

Your query works fine. I suggest to Log your active session token and make sure it is open when running query. You can check then state of session by using isOpened method

activeSession.getState().isOpened() 

best of luck :)

Upvotes: 1

Related Questions