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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:41:52+00:00 2026-06-10T11:41:52+00:00

I am creating facebook application where in user will be able to fetch the

  • 0

I am creating facebook application where in user will be able to fetch the company name of all the friends in friends list

FB.api('/me', function(response) { 
    var query = FB.Data.query('select name,work,work_history,pic_square 
       from user where uid IN (SELECT uid2 FROM friend WHERE uid1={0})', response.id) 
    query.wait(function(rows){ 
      var data = ""; 
      for (var i = 0; i < rows.length;i++) { 
         data += rows[i].name + " => " +'<img src="' +rows[i].pic_square + '" alt="image" />' + "===> "; 
         if(rows[i].work[i]||rows[i].work_history[i]) { 
             data+=rows[i].work_history[0].company_name+ "<br/>"; 
         } 
         data += "<br />";
       } 
       document.getElementById('location').innerHTML = data; 
     }); 
   }); 
} 
  • 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-10T11:41:53+00:00Added an answer on June 10, 2026 at 11:41 am

    You should check out https://developers.facebook.com/blog/post/561/

    FB.Data.query was deprecated a very long time ago. Here’s an example of how to achieve the same goal: http://www.fbrell.com/saved/b9b65bf81dc84b58fc1e167167b13112 (Note it only uses work_history, take a look at work too.

    A few things to consider:

    • When you have JS strings spreading on more rows, make sure you concatenate as in the example I included, you’ll save yourself a lot of headaches.
    • Why check rows[i].work[i]? i contains the value of the index of the current friend. Work and work_history are arrays of my previous jobs, you should check the length of the array and make sure it’s > 0.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating Facebook application which get insights for user's page for multiple metric.
Java fb API I am creating facebook web application, to create even following is
I am creating an application which uses the facebook api, and I want facebook
I am creating a facebook application in asp.net. I want that when user login
I am creating a Facebook application that will integrate into a mobile version of
I am creating a facebook application using ASP.NET. When the user click the browser
i am creating a facebook application which lets user to upload photo through html
I am creating a Facebook application which should allow the user do post something
I'm creating a Facebook application that uses many calls to Facebook's asynchrunner class. As
Am creating a Facebook like chat application.(Say for example am chatting with 4 users)

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.