Question

I am trying to use TinyURL with facebook comments plugin and running into some issues because of the fb_comment_id that gets tacked on by facebook for the links on the wall. What I intend to do is when user clicks on the link on the wall comment, I am sending them to an intermediate server side php script which processes some data based on GET params and redirects the user to the appropriate page with appropriate settings. However, I am trying to hide this intermediate page and settings for it from the user as well as make it much more elegant by using TinyURL (unless user explicitly digs into it). But when I pass the tinyurl to facebook comments plugin, the appended fb_comment_id param totally messes up tinyurl and I get an error page. Any thoughts on how to address this?

Thanks!

Was it helpful?

Solution

This is an issue I have faced too. The following notes are necessary:

  • TinyURL and other shorteners often respond with different urls each time you pass the same long url.
  • Facebook tries to go deeper into the url before deciding on the meta data of the link. URL shorteners are ok for FB shares, but doesn't always works for commenting, since they use HTTP 30x.

What you want is a stable link shortener which does the following:

  • takes an id/url and converts into a set of params and shows the meta variables needed for facebook.
  • forwards the user to the real destination page using perhaps a JS/meta refresh instead of a HTTP 30x.

What I did was to register a short domain and build this piece ourself. Registering a domain is obviously optional. Also, there may be link shorteners which perform exactly as what I mentioned above, but I decided against it since I was doubting the uptime of the non-popular shortening services.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top