pushtostart
pushtostart

Reputation: 1

Facebook Sharer.php not working properly

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?

Upvotes: 0

Views: 1392

Answers (2)

Teddy
Teddy

Reputation: 18572

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);

Upvotes: 0

Jose Villalobos
Jose Villalobos

Reputation: 373

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

Upvotes: 0

Related Questions