Exceptions in php sdk facebook using FQL (error 100)-Collection of common programming errors

I am trying to use FQL in facebook php sdk.

This is my code:


But I am getting an exception each time I run the script. I know that my appId and my secret are fine because I can use them for getting normal queries (not fql).

If I try to quit the try/catch, I got an exception message in browser:

Fatal error: Uncaught Exception: 100: Requires user session thrown in     C:\xampp\htdocs\prueba\base_facebook.php on line 1271

Do I need to use another param or command while executing fql? I have seen many answer about this and always use the same as I am doing, so I don’t know where the error is.

EDIT: If I use getResult instead for exception, I get this:

Notice: Array to string conversion in C:\xampp\htdocs\prueba\pru2.php on line 26
Got an Array while posting

Originally posted 2013-11-19 13:16:33.