Skip to content

Latest commit

 

History

History
9 lines (8 loc) · 1.75 KB

fb_getalluidfromfriendspage-js.md

File metadata and controls

9 lines (8 loc) · 1.75 KB
title date categories
Fb_getAllUidFromFriendsPage.Js
2023-11-23
useful-script-en

how to add bookmarklet in chrome
export default { name: { en: "Get all fb User ID from Friends page", en: "Get all fb user ids from friends page", }, description: { en: "Get all user IDs from friends facebook page", en: "Get all user IDs from facebook friends list page", }, whiteList: ["https://www.facebook.com/*"], onClick: async function() { // Get all uid from facebook page Search friends // Example: https://www.facebook.com/search/people/?q=*a&epa=FILTERS&filters=eyJmcmllbmRzIjoie1wibmFtZVwiOlwidXNlcnNZnJpZW5kc19vZl9wZW9wbGVcIixcImFyZ3NcIjpcIjEwMDA2NDI2NzYzMjI0MlwifSJ9 / / The above link was generated from the web: https://sowsearch.info/ let list_a = Array.from( document.querySelectorAll(".sjgh65i0 a[role='presentation']") ); if (!list_a.length) { return prompt( "Info not found, are you on the correct fb friends search page?" + "\nExample site:", "https://www.facebook.com/search/people/?q=*a " ); } alert("Retrieving uid information, open console to see progress..."); let uids = []; for (let a of list_a) { try { let l = a.href; let uid = l.split("profile.php?id=")[1]; if (uid) { uids.push(uid); console.log( uid); continue; } let name = l.split("facebook.com/")[1]; uid = await UsefulScriptGlobalPageContext.Facebook.getUidFromUrl(l); uids.push(uid); console.log(name, uid); } catch (e) { console.log("Error retrieving information of " + a, e); } } console.log(uids); prompt("All UID: ", uids.join("\n")); }, };