[英]Facebook Javascript Share UI include get variables in link
I am using the facebook SDK to share a page link: 我正在使用facebook SDK共享页面链接:
FB.ui({
method: 'feed',
link: 'http://freebirdevents.co.uk/test_results/?individual_result=1162',
caption:$(this).data('message'),
}, function(response){});
However it is ignoring get parameter, I've tried URL encoding to no avail. 但是,它忽略了get参数,我尝试了URL编码,但没有成功。
However it is ignoring get parameter
但是它忽略了get参数
That's because you are telling it to : 那是因为您告诉它 :
<link rel="canonical" href="http://freebirdevents.co.uk/test_results/" />
You specified here that the real URL for this piece of content is http://freebirdevents.co.uk/test_results/
. 您在此处指定的内容的实际URL为
http://freebirdevents.co.uk/test_results/
。 Facebook follows that, and goes on to request that URL to get the relevant meta data from. Facebook紧随其后,并继续请求该 URL以从中获取相关的元数据。
If you don't want that – then don't specify this as the canonical URL of the document. 如果您不希望这样做,请不要将其指定为文档的规范URL。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.