How to speak the language of Facebook

Facebook is a database.

Every person that you search and every post, photo, or detail on their About page has a unique Facebook ID (FBID). These ID numbers are what distinguish Facebook Graph Search from its native keyword search system.

Facebook launched Graph in March 2013 and killed it just over a year and a half later. And that actually makes sense. Facebook uses keyword search suggestions to shepherd users to expand their own networks using their interests and their profile connections. These suggestions can feel like stumbling blocks to researchers.

For a very short time Facebook Graph allowed anyone to search outside of these results. You could steer the direction of search by selecting a broad characteristic on the Facebook Graph widget. For example, you could look for people who shared a connection with a place, a page, employer and job title. But, in the background, what you were actually doing with this widget was selecting the official Facebook page for that place, page, employer and job title. Facebook uses these pages as the placeholders for their respective Facebook IDs. The widget built your queries using these IDs and the URL of the search results would look something like this:


Photos taken in Dodger Stadium and the photo upload date was last month

Facebook Graph never went away
The Graph widget disappeared in December 2014, but this change was fairly cosmetic. Everything that made Graph Search possible still exists. Profiles, Places, Employers, and Job Titles still have unique IDs and the query strings that connected them are still in use. Just view the HTML source of any Facebook page and search for the term “photos” to see what I mean. You’ll see over 200 query strings in the HTML and most of these still replicate the Facebook Graph search results you used to know. You can put them to use when you have a tool that knows what the query connects to and what it can deliver.

Facebook Graph HTML


Most of it is relatively straight forward. For example, the query /photos-in/ looks for images that were tagged to a place. This query needs to connect with an ID associated with a Place. On the other hand, /photos-by/ looks for images uploaded by a specific Profile, so Facebook understands this when it’s connected to a Profile ID.

You probably saw these query strings in the past when you searched Facebook Graph. They appear in the URL of the search results. What you probably didn’t know was that each of these queries is attached next to the ID or keyword of the thing you were interested in. When you take a closer look, the URL kind of reads like a question in several query segments and these segments read from right to left like this:

Photos taken in Dodger Stadium (130938320283723) and the photo date was last month


Once you see the structure, you can easily modify the question through the URL. For example, you could change the time frame for these photos from /last-month/ to this month by using the query /recent/. Facebook would responding by delivering photos uploaded this month. You could continue to modify the question by altering the time from again, such as /last-month/ or /2015/, or specifying the Profile that uploaded the images.

Facebook Graph always ended the URL of these types of search results with the term /intersect/. This, too, is a query and it directs Facebook to only deliver results where all of the conditions exist, such as the Photos at Dodger Stadium and the Photos Dated Last Month.

The Zen of Venn
When it comes to Facebook Graph, think Venn Diagram. When you’re using Graph you’re usually looking for connections; things that share something in common. There is some mindfulness to selecting these connections.

Facebook Venn DiagramThe diagram to the left describes our current question: Find the Photos taken at a Place and the Photos were dated last month.

You’ll notice that there is a hierarchy to these objects. The Person and Place are two independent entities and because of this they overlap wherever they share something in common.

Photos can be attached to both a Person and a Place, though the Person who uploaded it owns it. The Photo has its own unique ID and it also carries the ID of the Profile that uploaded it.

That’s how you can also search for All Photos uploaded by a Person.

The Date is also attached to the Photos and these Photos get tagged to Places when the uploader adds location information to the image, such as during a check-in. That tag is the connection that makes this particular intersection possible.

Some Facebook IDs are more important than others
In our Photo example, we intersected two objects, a Person (via their photos) and a Place. The intersection was made possible by the fact that both are independent entities. In Facebook’s hierarchy there are four independent entities like this: People, Pages, Events and Groups. You’ve seen these categories under the Facebook search box if you’ve used keyword search lately.

You probably encounter Pages more often than you think. Pages are the placeholders for most of the things that Facebook want you to add to your Profile: cities, schools, employers, your job title, the languages you speak, your political and religious views. When you add these, you connect with the official Page for that item and it enables us to search for all people who have also connected to that Page. Keep that in mind when conducting a search. If it has an official Page, it’s a top-level object.

Lower-level objects are attached to or owned by top-level objects. Photos, posts, and comments are attached to the Profile or Page that created them. When you connect them you also connect the objects that own them . This list outlines some of the most common objects and their place in the hierarchy.

Top-level: Independent objects
People  UserID
Pages    PageID, PlaceID, SchoolID, EmployerID, LanguageID, ProfessionID, DegreeID, etc
Events  EventID
Groups GroupID

Lower level: Attached to top-level objects
Photos   Posts
Videos   Comments

We explained how to find the IDs for these objects in a previous post and it’s relatively straight forward. When viewing a cover image, the Profile or Page ID is the last series of numbers following the the “a” in the URL.


For other uploads, the ID is found in the URL next “pb” for photos or “vb” for videos.


Verifying the ID is also easy. Simply place the ID in the URL next to Facebook.com/ or FB.com/ and the browser will redirect to the Profile or Page.


Facebook Graph never went away. The queries and the IDs that made it possible are still in place. The only thing researchers need is another widget that can collect the IDs and create the questions. You’ll find this widget on the NetBootCamp.org  Facebook Search Assistant and it continues to develop as we continue to learn the language of Facebook. Facebook Graph can still deliver the results you want. You don’t have to rely on the results that it suggests.