I have a client site that uses seo friendly URL's (/postname/)
Up until yesterday they were using the default permalink structure of ?p=1234
They've had it set like that for years and have had their posts shared on facebook, twitter, and other networks. The problem with changing the permalinks now is that the social media sharing badges on their site have all reset their counts to 0 because the actual URL has changed. I read that Twitter would eventually begin updating itself due to it's use of checking redirected URL's but that is not the case for facebook.
I would like to edit the code for the sharing buttons to pull in the original permalink instead of the new one. Is that possible?
$plink = get_permalink($post->ID);
$eplink = urlencode($plink);
What can I use in it's place to pull in the original p=1234 instead of the seo friendly name?