Home > Enterprise >  Facebook posts URL's sometimes show up in a weird format. Is there any way to convert this to p
Facebook posts URL's sometimes show up in a weird format. Is there any way to convert this to p

Time:07-14

Usually you'd have 3 formats a post URL will be:

  1. https://www.facebook.com/XXXXX/posts/YYYYY
  2. https://www.facebook.com/XXXXX/photos/a.AAAAA/YYYYY
  3. https://www.facebook.com/permalink.php?story_fbid=YYYYY&id=XXXXX

where XXXXX - page id, and YYYYY - post id (both are a string of digits), but sometimes, very rarely, you get a link which is of the 1st type, but instead of having the post id be a string of digits at the YYYYY spot, it is a string of symbols that seem to always start with "pfbid".

https://www.facebook.com/XXXXX/posts/pfbid02yEJj6dTFRtQ644Gq8qwaXt85pSi8Qvih3M6NBnbMqbJc1NM9QcdjWPpokoggDhNGl

Sometimes you can just click on the date of the post and get a regular link, but sometimes you can't get a link that isn't of this type. Is there any way to convert the string at the end to a post id or is there any other way to get a different Facebook post URL, that would be of type 1, 2 or 3?

CodePudding user response:

It's possible to retrieve post from graph api by calling endpoint /XXXXX_pfbidYYYYYY

It returns response with numeric id

  • Related