Can I stop Facebook adding parameters to a liked link?

筅森魡賤 提交于 2019-12-13 07:45:09

问题


We have had a standard Facebook Like button (box count) on all the article pages in our website for well over a year now, without an issue (e.g. Share with friends box near top right of article ).

When a user 'Likes' a page it sends all the right stuff to their Facebook profile (image, title, precede, etc)

The link however is appended by several parameters that, when clicked from within a Facebook profile, results in a 404(page cannot be found). This is in no way acceptable and I have had to turn off the Like button until I can resolve the issue.

Facebook adds these parameters to the link: (www.website.com/page?fb_action_ids=ZZZZZZZZZZZZZ&fb_action_types=og.likes&fb_source=aggregation&fb_aggregation_id=ZZZZZZZZZZZZZZZ)

The website needs only this as a link (www.website.com/page)

A similar issue occurred some time ago with AddThis links, but I was able to go to their site and check/uncheck something and problem solved (took 2min once I worked out what was happening).

No such luck with Facebook. Is there a way to 'turn off' the parameters?

I have spent many hours searching for a solution and found many ways to add more parameters etc. but nothing on how to remove the parameters. Website runs on Lotus Notes so PHP, ASP scripts etc will not work in this case

Please help so that our readers can resume sharing our articles amongst their friends.

Thanks in advance.


回答1:


Is there a way to 'turn off' the parameters?

No.

Facebook adds these parameters so that website owners can keep track of where incoming traffic from Facebook originated.

You have to set your site up in a way that it can deal with these query string parameters. I guess you have some rewriting set up, that sees the request for /page and rewrites this internally to a script call with parameters or something? If you show us how exactly this is done in your page environment, maybe we can suggest a fix for that.

Then, as a second step, if you don’t like the user coming from Facebook to see these parameters, you can do a redirect to your parameter-less version of your URL.



来源:https://stackoverflow.com/questions/11929897/can-i-stop-facebook-adding-parameters-to-a-liked-link

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!