The New Facebook Graph Search
source link: https://blog.nem.ec/2020/06/07/new-facebook-graph-search/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Note: this post originally appeared on this Github Gist on Jun 11, 2019. I’ve reposted it here for posterity.
How to Use
Take the following URL
https://www.facebook.com/search/top/?q=people&epa=FILTERS&filters=
Replace /search/top/
with the appropriate general search type (see
headings below). One filter from each second-level header can be combined
with each other, but I don’t believe you can combine multiple filters from
the same second-level header.
Replace the word people
with your keyword search term (this is sadly a
required field). It does not seem to be “semantic”, and it only serves to
add another filter to the below semantic filters.
Find any additional semantic filter(s) below (the JSON) that you want to filter
on. Use this page for testing
your JSON, but before submitting make sure you remove all whitespace from your
JSON - you can set the “JSON Template” drop down to Compact in the
formatter if you like, it will remove all whitespace for you. Note also that
often there is JSON embedded within JSON. This is where you’ll see a backslash
before a quote (\"
). Make sure to leave those backslashes alone.
When you combine filters, put them together in the same JSON object. For example, if I take Posts From a Page
{"rp_author":"{\"name\":\"author\",\"args\":\"119375054750638\"}"}
and combine with Posts I’ve Interacted
{"interacted_posts":"{\"name\":\"interacted_posts\",\"args\":\"\"}"}
the combined filter should look like this:
{
"rp_author":"{\"name\":\"author\",\"args\":\"119375054750638\"}",
"interacted_posts":"{\"name\":\"interacted_posts\",\"args\":\"\"}"
}
and compact down to:
{"rp_author":"{\"name\":\"author\",\"args\":\"119375054750638\"}","interacted_posts":"{\"name\":\"interacted_posts\",\"args\":\"\"}"}
Next, find a Base64 encoder and paste the compacted JSON into it. Encode the JSON above and you see the following:
eyJycF9hdXRob3IiOiJ7XCJuYW1lXCI6XCJhdXRob3JcIixcImFyZ3NcIjpcIjExOTM3NTA1NDc1MDYzOFwifSIsImludGVyYWN0ZWRfcG9zdHMiOiJ7XCJuYW1lXCI6XCJpbnRlcmFjdGVkX3Bvc3RzXCIsXCJhcmdzXCI6XCJcIn0ifQ==
Remove any equals signs at the end (Facebook doesn’t need them) and then put
the Base64’d JSON at the end of the URL you built above, after filters=
https://www.facebook.com/search/top/?q=people&epa=FILTERS&filters=eyJycF9hdXRob3IiOiJ7XCJuYW1lXCI6XCJhdXRob3JcIixcImFyZ3NcIjpcIjExOTM3NTA1NDc1MDYzOFwifSIsImludGVyYWN0ZWRfcG9zdHMiOiJ7XCJuYW1lXCI6XCJpbnRlcmFjdGVkX3Bvc3RzXCIsXCJhcmdzXCI6XCJcIn0ifQ
Initial inspiration
https://twitter.com/henkvaness/status/1136937742712094721
/search/top/
Sort By
Most Recent
{"rp_chrono_sort":"{\"name\":\"chronosort\",\"args\":\"\"}"}
Posts From
Posts from you
{"rp_author":"{\"name\":\"author_me\",\"args\":\"\"}"}
Posts from Your Friends
{"rp_author":"{\"name\":\"author_friends_feed\",\"args\":\"\"}"}
Posts From Your Groups and Pages
{"rp_author":"{\"name\":\"my_groups_and_pages_posts\",\"args\":\"\"}"}
Posts From Public
{"rp_author":"{\"name\":\"merged_public_posts\",\"args\":\"\"}"}
Posts from page:
{"rp_author":"{\"name\":\"author\",\"args\":\"119375054750638\"}"}
Post Type
Posts You’ve Seen
{"interacted_posts":"{\"name\":\"interacted_posts\",\"args\":\"\"}"}
Posted In Group
Your Groups
{"rp_group":"{\"name\":\"my_groups_posts\",\"args\":\"\"}"}
From Group
{"rp_group":"{\"name\":\"group_posts\",\"args\":\"574981909329531\"}"}
Tagged Location
{"rp_location":"{\"name\":\"location\",\"args\":\"115028691842393\"}"}
Date Posted
{"rp_creation_time":"{\"name\":\"creation_time\",\"args\":\"{\\\"start_year\\\":\\\"2019\\\",\\\"start_month\\\":\\\"2019-1\\\",\\\"end_year\\\":\\\"2019\\\",\\\"end_month\\\":\\\"2019-12\\\",\\\"start_day\\\":\\\"2019-1-1\\\",\\\"end_day\\\":\\\"2019-12-31\\\"}\"}"}
/search/posts/
Posts From
Posts from you
{"rp_author":"{\"name\":\"author_me\",\"args\":\"\"}"}
Posts from Your Friends
{"rp_author":"{\"name\":\"author_friends_feed\",\"args\":\"\"}"}
Posts From Your Groups and Pages
{"rp_author":"{\"name\":\"my_groups_and_pages_posts\",\"args\":\"\"}"}
Posts From Public
{"rp_author":"{\"name\":\"merged_public_posts\",\"args\":\"\"}"}
Posts from page:
{"rp_author":"{\"name\":\"author\",\"args\":\"119375054750638\"}"}
Post Type
Posts You’ve Seen
{"interacted_posts":"{\"name\":\"interacted_posts\",\"args\":\"\"}"}
Posted In Group
Your Groups
{"rp_group":"{\"name\":\"my_groups_posts\",\"args\":\"\"}"}
From Group
{"rp_group":"{\"name\":\"group_posts\",\"args\":\"574981909329531\"}"}
Tagged Location
{"rp_location":"{\"name\":\"location\",\"args\":\"115028691842393\"}"}
Date Posted
{"rp_creation_time":"{\"name\":\"creation_time\",\"args\":\"{\\\"start_year\\\":\\\"2019\\\",\\\"start_month\\\":\\\"2019-1\\\",\\\"end_year\\\":\\\"2019\\\",\\\"end_month\\\":\\\"2019-12\\\",\\\"start_day\\\":\\\"2019-1-1\\\",\\\"end_day\\\":\\\"2019-12-31\\\"}\"}"}
/search/people/
{"city":"{\"name\":\"users_location\",\"args\":\"115028691842393\"}"}
Education
{"school":"{\"name\":\"users_school\",\"args\":\"751335894893898\"}"}
{"employer":"{\"name\":\"users_employer\",\"args\":\"20531316728\"}"}
Mutual Friends
Friends
{"friends":"{\"name\":\"users_friends\",\"args\":\"\"}"}
Friends of Friends
{"friends":"{\"name\":\"users_friends_of_friends\",\"args\":\"\"}"}
Friend with People
{"friends":"{\"name\":\"users_friends_of_people\",\"args\":\"100000154813605\"}"}
/search/photos/
Posted By
Posts from you
{"rp_author":"{\"name\":\"author_me\",\"args\":\"\"}"}
Posts from Your Friends
{"rp_author":"{\"name\":\"author_friends_feed\",\"args\":\"\"}"}
Posts From Your Groups and Pages
{"rp_author":"{\"name\":\"my_groups_and_pages_posts\",\"args\":\"\"}"}
Posts From Public
{"rp_author":"{\"name\":\"merged_public_posts\",\"args\":\"\"}"}
Posts from page:
{"rp_author":"{\"name\":\"author\",\"args\":\"119375054750638\"}"}
Photo Type
Photos you’ve seen
{"interacted_photos":"{\"name\":\"interacted_photos\",\"args\":\"\"}"}
Tagged Location
{"rp_location":"{\"name\":\"location\",\"args\":\"115028691842393\"}"}
Date Posted
{"rp_creation_time":"{\"name\":\"creation_time\",\"args\":\"{\\\"start_year\\\":\\\"2019\\\",\\\"start_month\\\":\\\"2019-1\\\",\\\"end_year\\\":\\\"2019\\\",\\\"end_month\\\":\\\"2019-12\\\",\\\"start_day\\\":\\\"2019-1-1\\\",\\\"end_day\\\":\\\"2019-12-31\\\"}\"}"}
/search/videos/
Source
{"videos_source":"{\"name\":\"videos_live\",\"args\":\"\"}"}
Episodes
{"videos_source":"{\"name\":\"videos_episode\",\"args\":\"\"}"}
Friends and Groups
{"videos_source":"{\"name\":\"videos_feed\",\"args\":\"\"}"}
Tagged Location
{"rp_location":"{\"name\":\"location\",\"args\":\"115028691842393\"}"}
Date Posted
{"rp_creation_time":"{\"name\":\"creation_time\",\"args\":\"{\\\"start_year\\\":\\\"2019\\\",\\\"start_month\\\":\\\"2019-1\\\",\\\"end_year\\\":\\\"2019\\\",\\\"end_month\\\":\\\"2019-12\\\",\\\"start_day\\\":\\\"2019-1-1\\\",\\\"end_day\\\":\\\"2019-12-31\\\"}\"}"}
/search/pages/
Verified
Verified
{"verified":"{\"name\":\"pages_verified\",\"args\":\"\"}"}
Category
Local Business or Place
{"category":"{\"name\":\"pages_category\",\"args\":\"1006\"}"}
Company, Organization, Or Institution
{"category":"{\"name\":\"pages_category\",\"args\":\"1013\"}"}
Brand or Product
{"category":"{\"name\":\"pages_category\",\"args\":\"1009\"}"}
###Artist, Band, or Public Figure
{"category":"{\"name\":\"pages_category\",\"args\":\"1007,180164648685982\"}"}
Entertainment
{"category":"{\"name\":\"pages_category\",\"args\":\"1019\"}"}
Cause or Community
{"category":"{\"name\":\"pages_category\",\"args\":\"2612\"}"}
/search/places/
This one is different… I haven’t figured out how it works yet. The ref=
parameter decodes into something with a session ID or something:
{"sid":"97e8f46cce641da376d91e4b2b1c2381","ref":"places_top_module_see_more"}
Recommend
-
12
Facebook sharing metadata for eZ Platform with Open Graph Bundle Facebook sharing uses the Open Graph protocol to markup web do...
-
4
POSTED ON AUGUST 18, 2021 TO Core Data RAMP-TAO: Layering atomic transactions on Facebook’s online graph store
-
4
Today, we are releasing Facebook Graph API v12.0 and Marketing API v12.0. Below, we’ve highlighted changes that will impact parts of our developer community. These changes include announcements and product updates, reminders from prior launc...
-
9
TAO: Facebook’s Distributed Data Store for the Social Graph Published October 13, 2021 Found something wrong? Submit a pull request! ...
-
9
Graph Traversal (Depth/Breadth First Search) slowfast 012346321657 Given a graph, we can use the O(V+E) DFS (Depth-First Search) or BFS (Breadth-First Search) algorithm to traverse t...
-
7
Microsoft Graph Mailbag – Search DriveItems for Only Files Brian February 10th, 2022 In today’...
-
4
Azure DevOps Graph connectors for Microsoft Search Gloridel Morales
-
13
Introduction With an ever-increasing requirement for data driven decision-making, organizations want to store the information in its entirety. This information is maintained in multiple systems inside an organizatio...
-
4
We are excited to announce that we have now shipped capability for Teams Mobile iOS users to let users search their 3rd party enterprise content, powered by Graph Connectors! It is the first mobile experience to...
-
3
@arslanArslan UrtashevFormer C++ software engineer. CTO of Assistant and Devices. If you know about the...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK