Skip to content

Instantly share code, notes, and snippets.

@silverwolfceh
Created October 14, 2018 04:59
Show Gist options
  • Save silverwolfceh/b60e0f1176dfe6ce8c2ca52b7213e155 to your computer and use it in GitHub Desktop.
Save silverwolfceh/b60e0f1176dfe6ce8c2ca52b7213e155 to your computer and use it in GitHub Desktop.
Get Facebook ID of page, group, profile
javascript:!function(){if(document.querySelector("div[class='_4-u2 _hoc clearfix _4adj _4-u8']")!=null){prompt("ID",document.querySelector("div[class='_4-u2 _hoc clearfix _4adj _4-u8']").getAttribute('id').split('_')[1])}else if(document.querySelector("a[class='_2dgj']")!=null){prompt("ID",document.querySelector("a[class='_2dgj']").getAttribute('href').split('/')[1])}else if(document.querySelector("div[id='pagelet_timeline_main_column']")!=null){prompt("ID",JSON.parse(document.querySelector("div[id='pagelet_timeline_main_column']").getAttribute('data-gt')).profile_owner)}}()
@silverwolfceh
Copy link
Author

@locmai0808
Copy link

Credit: me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment