Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6736899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:11:05+00:00 2026-05-26T11:11:05+00:00

Facebook announced possibility to use FQL via Graph API: https://developers.facebook.com/blog/post/579/ That is very nice,

  • 0

Facebook announced possibility to use FQL via Graph API: https://developers.facebook.com/blog/post/579/

That is very nice, but I’d like to use it via PHP SDK as all my application uses it and all authorization goes through that library. I have the newest Git version of SDK, but this:

$facebook->api('/fql?q=SELECT+uid2+FROM+friend+WHERE+uid1=me()');

…or similar queries just don’t work. It returns empty array(s) or freezes my Apache (!). What magic happens inside of the library that such an easy select or it’s results can’t pass through?

EDIT: I know I can use REST API support in PHP SDK as you mention. I was curious about using the new method, because REST API is deprecated and very likely it won’t exist any more in a couple of months. My policy is to use the latest available features Facebook released. Doing so I won’t need to update my code every now and then because of using deprecated features.

EDIT 2: Well, I hope there is no LSD in my room… however, today I opened my browser with all my previous attempts to use different approaches mentioned above and guess what…? It works! Now I can use exactly that piece of code I wrote a few lines higher and it perfectly returns what is expected… Instead of WTF, I say: Facebook Platform.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:11:06+00:00Added an answer on May 26, 2026 at 11:11 am

    You can indeed use FQL through the api method.

    try this:

    $fql = 'SELECT uid2 FROM friend WHERE uid1 = me()';
    $ret_obj = $facebook->api(array(
                                     'method' => 'fql.query',
                                     'query' => $fql,
                                   ));
    

    As you can see you must specify that you are running an FQL query, and then pass the FQL statement into the array.

    EDIT:

    // Making a graph API call with FQL outside of the PHP SDK.
    
    $fql_query_url = 'https://graph.facebook.com/'
    . '/fql?q=SELECT+uid2+FROM+friend+WHERE+uid1=me()'
    . '&' . $access_token;
    
    $fql_query_result = file_get_contents($fql_query_url);
    $fql_query_obj = json_decode($fql_query_result, true);
    

    Inside the PHP SDK, you must use the fql.query method, there is no other way of executing an FQL query within the SDK (Yet).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Facebook recently added photo-tagging capabilities to its Graph API: http://developers.facebook.com/blog/post/509/ I am using FbConnect
Facebook has a new Batch request Graph API that I'm trying to consume. The
Facebook graph API tells me I can get a profile picture of a user
The Facebook Graph API lists a 'link' parameter in its documentation , which is
Microsoft recently announced their Facebook SDK. http://msdn.microsoft.com/en-us/windows/ee388574.aspx Has anyone tried using it with ASP.NET
Facebook changed their Graph API recently to require an access token. Therefore I quickly
Facebook is deprecating FBML and recommending JavaScript SDK (on Graph API) with Social Plugins
Facebook released released a registration plugin here http://developers.facebook.com/docs/user_registration few weeks ago. I was wondering
Facebook announced that they are about to remove app profile pages and allowing to
So facebook just implemented this per-app post privacy setting for all applications as announced

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.