Facebook – Can’t use facebook sharer.php custom parameters in mobile sites

facebookfacebook-sharer

I own a jQuery mobile website. There i using facebook share option with custom parameters to add title, description, image with link

Like below,
https://www.facebook.com/sharer/sharer.php?s=100&p%5Burl%5D=http%3A%2F%2Fgoogle%2F&p%5Bimages%5D%5B0%5D=https://www.google.com/images/srpr/logo3w.png&p%5Btitle%5D=My%20own%20title&p%5Bsummary%5D=My%20own%20description

But when i try the same link to mobile, it will redirect to
http://m.facebook.com/sharer.php?s=100&p%5Burl%5D=http%3A%2F%2Fgoogle%2F&p%5Bimages%5D%5B0%5D=https%3A%2F%2Fwww.google.com%2Fimages%2Fsrpr%2Flogo3w.png&p%5Btitle%5D=My+own+title&p%5Bsummary%5D=My+own+description&_rdr

which means, it will add m.facebook at the start of share url. so it wont work with custom title, desc, image & link.

Anyway to fix this? or how to force mobile web to not to go with m.facebook.com ?

Best Answer

You can prevent Facebook from going to the mobile site by adding a ?m2w parameter to the URL. Then, sharer.php works like usual.

e.g.

 https://www.facebook.com/sharer/sharer.php?m2w&s=100.... (etc)

Looks kind of bad though, looking for a better answer.

Edit: Sharer.php has been deprecated, see Felix' answer below.

Related Topic