Get Facebook UID

Extract FB UID in Profile URL

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// visit some profile on fb, then open console then type and press enter: get_id
// ==UserScript==
// @name         Get Facebook UID
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Extract FB UID in Profile URL
// @author       Loc Vo
// @match        https://www.facebook.com/*
// @require      http://code.jquery.com/jquery-latest.js
// @grant        unsafeWindow
// ==/UserScript==

(function() {
    'use strict';
    let uid = JSON.parse(document.getElementById("pagelet_timeline_main_column").getAttribute("data-gt")).profile_owner;
    if(uid != null && uid != '') {
        console.log(uid);
        unsafeWindow.fbid=uid;
    }
})();