0

I'm working on a service which can share url's to different social networks such as Facebook but I've run into some issues with how Facebook deals with it's own posts and content.

I've a page on my url, my-domain.com/share/u?URL where the URL parameter will be crawled and correct meta-tags and opengraph tags will be added to the page which then can be crawled by e.g. Facebook.

However, if I have a Facebook post URL (e.g. https://www.facebook.com/smashmag/posts/10154297276027490) and add this to my og:url meta-tag, facebook graph debugger reports it as a bug and when I try to share the custom url, it will not fetch or create a preview of it.

If I directly use the facebook share url with the post there are no issues (https://www.facebook.com/sharer/sharer.php?u=https://www.facebook.com/smashmag/posts/10154297276027490)

Is there any way to get around this or make facebook treat it's own URLs and posts as a valid og:url tag?


On my own service, I crawl facebook pages as well and here I can fetch the URL and create an embed post so this is not where the problem lies. It is simply when I want to share a custom URL on facebook, which actually is a redirect URL to a Facebook post URL.

Please let me know if I've explained myself unclear and I'll try to elaborate.

3
  • Makes little sense to me; what would be the purpose of the redirect? If I want to share a Facebook post, then I can do that via its URL directly - what for does your app need to interject itself into that process?
    – CBroe
    Jun 14, 2016 at 10:01
  • Yes I know that it can seem pointless to things like this but one part of the service is to create a custom share URL for a user to further track how many users on e.g. Facebook have clicked on that exact link. This would not be possible with the standard facebook post url in that I only can get the total numbers of shares and likes. So sharing a URL to your facebook with domain.com/u/token will make a short trip through my page and then I can redirect them to the correct URL. Jun 14, 2016 at 10:10
  • Well then you have to use your URL in the og:url meta in the first place - otherwise Facebook will not send users to your URL when the shared link is clicked, but directly to that of the post.
    – CBroe
    Jun 14, 2016 at 10:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.