facebook - Can't share URL on social networks via their sharer -
when trying share url via facebook, twitter or g+ trim url in wrong way. example when press link:
- "www.facebook.com/sharer.php?u=mysite.com/index.php?page=item&id=33140"
- "twitter.com/share?url=mysite.com/index.php?page=item&id=33140"
- "plus.google.com/share?url=mysite.com/index.php?page=item&id=33140"
they throw away last part: "&id=33140" , try share "mysite.com/index.php?page=item" page doesn't exist on website.
how force them process whole url?
you have percent encode url this: http%3a%2f%2fzabor.kg%2findex.php%3fpage%3ditem%26id%3d33688
.
e.g. https://plus.google.com/share?url=http%3a%2f%2fzabor.kg%2findex.php%3fpage%3ditem%26id%3d33688
the reason sort of worked because sites read plus.google.com/share?url=mysite.com/index.php?page=item&id=33140
having query parameter of url
, query parameter of id
. because &
not encoded servers think it's ending url
parameter , not part of url
value.
Comments
Post a Comment