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 7436693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:16:50+00:00 2026-05-29T10:16:50+00:00

I have some code that was working one month ago… now, when I check

  • 0

I have some code that was working one month ago… now, when I check it, it doesn’t work. I saw what was the problem, the console says: “unexpected end of query”

I have checked this query on Graph API Tools and it works! I use the same permissions as on my “app”.

This is the FQL Query:

SELECT uid,name FROM user WHERE uid IN ( SELECT uid2 FROM friend WHERE
uid1 = me() ) ORDER BY name

And this is the complete code:

// This code is in an html file
window.fbAsyncInit = function() { 
FB.init({
      appId      : '226472757418610', 
      status     : true,
      cookie     : true,
      oauth      : true,
      xfbml      : true 
    });
}
...
// this code is in a javascript file and the user is correctly logged in
FB.api('/fql?q=SELECT uid,name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) ORDER BY name', function(amigos) { 
     console.log(amigos)
     // it prints the message above
});

I can’t see any error! Could you suggest what could be wrong with my code?

  • 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-29T10:16:51+00:00Added an answer on May 29, 2026 at 10:16 am

    If any have problem with this “unexpected end of query”, you could try changing your code for this one:

    FB.api('/fql', { q:{"query1":"yourQuery"} }, function(response) {
        // the response is different: 
        var x = response.data[0].fql_result_set;
    });
    

    Although is not the best solution.

    Update: It’s not necessary q to be an object.. It could be only your query and the result could be get it by response.data

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

Sidebar

Related Questions

I have some PHP code that was at one point WORKING FINE. It makes
I have some code I am working on that worked just fine until I
I have to modify some code in a application I am working on that
I have been working on some legacy C++ code that uses variable length structures
I have some really complicated legacy code I've been working on that crashes when
I have some code within one function that I want to separate into its
So far, I have some working code that goes into a list of servers
I'm new to StructureMap and have some existing code that I'm working with that
I have some code (that is working), but I just want to make sure
I'm trying to simulate some code that I have working with SQL but using

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.