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

  • SEARCH
  • Home
  • 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 6151095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:43:14+00:00 2026-05-23T19:43:14+00:00

I am using Facebook’s Facebook Query Language (FQL) to get information on a user

  • 0

I am using Facebook’s Facebook Query Language (FQL) to get information on a user once I already know his user id. When I enter the following URL into Firefox, it returns the correct XML for the request:

http://api.facebook.com/method/fql.query?query=SELECT name FROM user WHERE uid= **‘

Namely it returns the user’s name.

Note: please don’t suggest using Graph API as I will in fact be using FQL for things not implemented in Graph yet like networks, this is just a simple example.

BUT, when I go to the page on my website which executes the following PHP code:

        $url = 'http://api.facebook.com/method/fql.query?query=SELECT name FROM user WHERE uid=**********';
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        $response = curl_exec($ch);
        curl_close($ch);
        echo($response);

I see:

 Method Not Implemented

 Invalid method in request

This shouldn’t be an authentication problem either, name is something that is publicly available.

For more insight, when I enter any malformed FQL request, the PHP page correctly returns an error XML, just as it would when you enter the URL in Firefox. It is only when I enter a CORRECTLY FORMED FQL request that it differs from what I see in Firefox, namely, it gives the error above, which is not even XML.

Any ideas? Thanks.

  • 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-23T19:43:14+00:00Added an answer on May 23, 2026 at 7:43 pm

    Are you properly encoding the query parameters? Try something like:

    $query = 'SELECT name FROM user WHERE uid=**********';
    $url = 'http://api.facebook.com/method/fql.query?query=' . rawurlencode($query);
    

    Or you can use the Facebook PHP SDK which automatically does this for you.

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

Sidebar

Related Questions

Is it possible to query using Facebook Query Language when not currently logged in
I am using Facebook FQL to get photos and the time when they were
When using Facebook Connect via the javascript library, I get the following javascript error.
im using the Facebook PHP Client library and want to get the Events of
I'm using Facebook graph API for my iPhone app to get a list of
I am using Facebook PHP SDK to authenticate the user. After generating the LoginUrl
I am using Facebook Connect for iPhone and following the official instructions . I
Using Facebook's PHP SDK, I was able to get Facebook login working pretty quickly
I am using Facebook PHP SDK 3.0 I would like to know how could
I am using Facebook API how i can get userid in facebook from its

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.