我如何获得Facebook分享链接忽略和字符

i got a problem here. On my site i have a facebook share button, but it sends a link with some get variables. So im guessing facebook just handles these as $_GET['blabla'] but i want that link to be shared.

Currently the link to be shared is:

http://www.EXAMPLE.com/wptest/?page_id=38&vodid=1&t=152

so the link is:

http://www.facebook.com/sharer/sharer.php?s=100&p[url]=www.EXAMPLE.com/wptest/?page_id=38&vodid=1&t=152

But facebook only shares:

http://www.EXAMPLE.com/wptest/?page_id=38

how to i get my url so facebook (and other sites) treat the whole thing as a link instead of just filling the get array?

What you should do is URL encode the link before going to the sharer.php link, so the link you should use is:

http://www.facebook.com/sharer/sharer.php?s=100&u=http%3A%2F%2Fwww.example.com%2Fwptest%2F%3Fpage_id%3D38%26vodid%3D1%26t%3D152

i.e.

http://www.example.com/wptest/?page_id=38&vodid=1&t=152 becomes http%3A%2F%2Fwww.example.com%2Fwptest%2F%3Fpage_id%3D38%26vodid%3D1%26t%3D152

If you look at the above example, you'll see that the Facebook Sharer page will correctly display the URL in the dialog:

Share Dialog