Take the 2-minute tour ×

We are using facebook.com/sharer.php?u="ourwebsite.com" to share pages.. only problem is, when we try to share pages that have subdirectories, like "ourwebsite.com/blog/," it will share the link "ourwebsite.com/b," and leave out the rest of the url.. any idea why?

share|improve this question
add comment

2 Answers

It seems to me that probably you are trimming the url, try to encode it before sharing it.

share|improve this answer
add comment

also, use the full URL (add http://).

Or just do it in javascript:

var sharer_url = "http://www.facebook.com/sharer.php?u="+encodeURIComponent(document.location);
share|improve this answer
add comment

Your Answer


