Get Facebook UID

Extract FB UID in Profile URL

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// 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;
    }
})();