Skip to content

Latest commit

 

History

History
9 lines (8 loc) · 1001 Bytes

fb_getuidfromurl-js.md

File metadata and controls

9 lines (8 loc) · 1001 Bytes
title date categories
Fb_getUidFromUrl.Js
2023-11-23
useful-script-en

how to add bookmarklet in chrome
import { showLoading } from "./helpers/utils.js"; export default { name: { en: "Get fb User ID from url", vi: "Get fb User ID from URL", }, description: { en: "Get id of facebook user from entered url", vi: "Get facebook user id from incoming URL", }, onClick: function() { / / Get UID from user fb's url. For example, https://www.facebook.com/99.hoangtran const url = prompt("Enter user url fb:", ""); if (url) { UsefulScriptGlobalPageContext.Facebook.getUidFromUrl(url) .then((uid) => { if (uid) prompt('UID of user ${ url}:', uid); else alert("User uid not found!"); }) .catch((err) => alert("Error: " + err.message) ); } }, };