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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T13:14:38+00:00 2026-06-02T13:14:38+00:00

FB.api( { method: ‘fql.query’, query: ‘select uid,name from user where uid in (select uid2

  • 0


FB.api(
{
method: 'fql.query',
query: 'select uid,name from user where uid in (select uid2 from friend where uid1 ='+me.id+') AND current_location='+me.location.name
},function(data) {
alert(data);

}

iam trying to get the friends based on the current user location.But this query is not working? Is there any possible way to write this as a single query?
I need to loop all the datas to check the current location else ,but it takes time for checking it.So iam looking for single query to get the datas? Could any one help me with it?

  • 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-06-02T13:14:39+00:00Added an answer on June 2, 2026 at 1:14 pm

    This is just an idea,
    firstly your application requires user_location and friends_location as permissions.

    Why don’t you modify your query to something like this

    FB.api(
    {
       method: 'fql.query',
       query: 'select uid,name,current_location from user where uid in (select uid2 from friend where uid1 ='+me.id+')
       },function(data) { alert(data);
    }
    

    The idea is to get current_location of user and user’s friends and then do your filtering.

    Hope this helps

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

Sidebar

Related Questions

here is my query: FB.api( { method: 'fql.multiquery', queries: { 'friends':'SELECT uid1 FROM friend
Is there a way to validate the response from say: FB.api( { method: 'fql.query',
Is there a common method/api to list all web browsers (name, executable, default yes/no)
Based on a file name, or a file handle, is there a Win-API method
We are using the Google Maps API method getLocations() for geocoding addresses the user
I'm writing an API method that returns a list of objects from a web
Is there any method / API defined to collect system info in osx. I
I have a function that uses the SharePoint api so the method SPUtility.GetLocalizedString is
Is there any built-in method in OpenCV ( C++ API ) to subtract two
I normally use a dirty method to get my Facebook Graph API token key

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.