I have a link that a user can share on fb
and G+
.
The user can modify that link and he did it with an ajax call so the page is not refreshing.
My gplus button code :
<link rel="canonical" href="{{ url }}" />
<g:plus action="share" style="height: 28px;" ></g:plus>
when the user changes the url I update the href
attribute too :
$.post(url,{
someParams:"someValues"
},function(data){
.
.
.
// updating the href attribute with the new modified url
$('link[rel="canonical"]').attr("href",data.url);
}
The problem is that the G+
button still load the old url.
But only by refreshing I get the new one.
My question is how can i change the G+
url without refreshing the page ?