Created
December 25, 2013 11:17
-
-
Save 19h/8122309 to your computer and use it in GitHub Desktop.
Facebook Messenger (iOS) initialization graph query over an inofficial API.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
viewer() { | |
messenger_contacts { | |
deltas.after(Nzg1NDY3Nzk1OjEzODc5Njc0NTE=).contact_profile_type(user) { | |
page_info { | |
end_cursor | |
}, nodes { | |
added_edge { | |
time, node { | |
id, graph_api_write_id, phone_entries { | |
is_verified, primary_field { | |
label, phone { | |
display_number, universal_number | |
} | |
} | |
}, phonetic_name { | |
parts { | |
offset, length, part | |
}, text | |
}, profile_picture.size(88, 88) as small_profile_picture { | |
uri | |
}, profile_picture.size(160, 160) as large_profile_picture { | |
uri | |
}, represented_profile { | |
id, is_mobile_pushable, is_messenger_user, is_viewer_friend, messenger_version_max, name_search_tokens, viewer_affinity.method(communication) as rank | |
}, structured_name { | |
parts { | |
offset, length, part | |
}, text | |
} | |
} | |
}, removed | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Analysis
SELECT * FROM deltas.after:* WHERE contact_profile_type = "user"
page_info
andnodes
.page_info
might be a control-statement and is puzzling. Considering the response to the query, the statementend_cursor
points to the last or if no result yielded, local user of the query. This is very likely a timestamp influencing the next requests. (we already have a similar value inside our deltas.after call, thus this might be the key used for the next request in order to receive all appropiate deltas)nodes
obviously is a selector of the fields resulted from the query.Conclusion
There seems to be only three key statements influecing the query itself:
viewer
(as perspective?),messenger_contacts
(as table selector?) and the deltas.after call. Everything inside the deltas.after wrap indicates that it is formatting the results and queried fields in a form desired by the api client.