tags:

views:

31

answers:

2

For example, is there a way to query "Stanford University" and get its facebook id "6192688417"?

+1  A: 

Hey,

There is a difference between various entities, some are friends, some are pages, and some are groups. There is a query language in Facebook using the API, which is called FQL. It looks like SQL, but you can use FQL to query the structure and get its associated ID.

Check out the resources at: developers.facebook.com, specifically this: http://developers.facebook.com/docs/reference/fql/

It has a JS, PHP, or there are .NET API's available.

HTH.

Brian
+1 Good answer, i was thinking about the same but too lazy this time :(
Sarfraz
Thanks Brian, could you get me just a bit more detail? I've a list of school names (high schools and colleges), and I want to find their facebook is, which table should I query and how?
oliodu
Well, here comes the fun part: is the college setup as a group, a page, or a friend in the system? For instance, most entities like a school are probably a page, but I've also seen where organizations will create a group. Additionally, some just create a friend for the org (why, not sure, but that's how they do it). So you have to know the entity or entities you are going after.
Brian
Let's assume a page, so you could craft a query like:"select page_id from page where name = 'University of Pittsburgh'". Now, you are limited into your query constructs and as to what field can go into the where clause; I would highly recommend reading that, and check out the page table definition at http://developers.facebook.com/docs/reference/fql/page. But each entity is different, and so you have to plan this feature out carefully; you may want to use the rest API instead. They've changed the API around so they may have added some helpful methods.
Brian
A: 

Just type in search bar your query , automatically you will get the suggestion related to your search . moreover you can find the people also communities and fan page . there is lot of ways to do your task

Facebook Application Development

jack

related questions