Skip to content

Instantly share code, notes, and snippets.

@NickCarneiro
Created August 14, 2014 22:00
Show Gist options
  • Save NickCarneiro/3382590db59cc8d5642b to your computer and use it in GitHub Desktop.
Save NickCarneiro/3382590db59cc8d5642b to your computer and use it in GitHub Desktop.
Snippet for finding devs on Facebook
// 1) install jquery injector https://chrome.google.com/webstore/detail/jquery-injector/indebdooekgjhkncmgbkeopjebofdoid
// 2) using graph search, do something like "My friends of friends who live in San Francisco, California and studied Computer Science"
// 3) Run this in the chrome console
// 4) Paste the pipe-delimited output into a file
$('._1zf').each(function() {
var name = $(this).find('a').first().text().trim();
var employmentContainer = $(this).find('._pac');
var links = $(employmentContainer).find('a');
if (links.length === 1) {
var companyName = $(links[0]).text().trim();
var jobTitle = 'Title unknown';
} else {
var jobTitle = $(links[0]).text().trim();
var companyName = $(links[1]).text().trim();
}
var mutualFriend = $(this).find('._52eh:contains("Friends with")').first().find('a').first().text().trim();
console.log(name + ' | ' + jobTitle + ' | ' + companyName + ' | ' + mutualFriend);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment