views:

266

answers:

0

Hey

I'm trying to query Facebook with the PHP Library and what I've read it shouldn't required a session key, or rather it shouldn't require one for my case, but my code below gives me the following error: "Session key invalid or no longer valid".

http://wiki.developers.facebook.com/index.php/Fql.query "For example, querying the user table is like calling users.getInfo without a session key -- you can query only on a few fields."

$fb = new Facebook(FACEBOOK_KEY, FACEBOOK_SECRET);

$query = "SELECT uid,
    name,
    sex,
    pic_square,
    profile_url
    FROM user WHERE name = 'some name' OR username = 'some name'";

$result = $fb->api_client->fql_query($query);

Any ideas?

/Thanks

related questions