I've been having a problem with a specific FQL call for a few days now, hoping someone can point me in the right direction, and yes, correct permissions are being asked for.
Using the PHP SDK, making the following FQL multiquery works
$user_fql = urlencode("SELECT uid, first_name, middle_name, last_name, name, birthday_date, hometown_location, current_location, education, religion, political, interests, work FROM user WHERE uid = me()");
$friend_count_fql = urlencode("SELECT friend_count FROM user WHERE uid = me()");
$multiquery = json_encode(array("user" => $user_fql, "friend_count" => $friend_count_fql));
$user = $facebook->api("/fql?q=".$multiquery."&access_token=".$access_token."&format=json-strings");
However when making this FQL call
$friends_fql = urlencode("SELECT uid, first_name, middle_name, last_name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) LIMIT 10");
$friends = $facebook->api("/fql?q=".$friends_fql."&access_token=".$access_token."&format=json-strings");
The following error is thrown
{"error":{"message":"A user access token is required to request this resource.","type":"OAuthException","code":102}}
And the permissions we are asking for
create_note email, friends_birthday, friends_education_history, friends_groups
friends_hometown, friends_interests, friends_likes, friends_location,
friends_relationships, friends_religion_politics, friends_work_history, photo_upload,
publish_actions, publish_stream, read_stream share_item status_update user_birthday
user_education_history, user_hometown, user_likes user_location, user_religion_politics,
user_work_history, video_upload
I can't figure why getting user's friends info is throwing an OAuthException since this was working locally before pushing it to a remote server and the user access token I'm testing with is valid for the app and hasn't expired. Any suggestions would be much appreciated!