Created
          November 28, 2022 12:22 
        
      - 
      
- 
        Save t-wy/66faed8679d127793891ecb775efdaa9 to your computer and use it in GitHub Desktop. 
    Get Facebook canonical Post ID (share URL) without pfbid parameter
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | javascript: fbid = /share_fbid":"(\d+)"/g.exec([...document.getElementsByTagName("script")].filter(x => x.innerHTML.includes("share_fbid"))[0].innerHTML)[1]; alert(location.href.split("/").slice(0, -1).join("/") + "/" + fbid); | |
| // can be used in console / bookmark / address bar (remember to add back javascript if the browser strips it automatically) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Here's another way.