如何强制电报更新链接预览?

时间:2016-02-08 11:48:34

标签: seo telegram

电报将描述元标记显示为链接预览。 我更改了描述元标记,但我的网站的链接预览没有改变。 如何强制电报更新链接预览?

3 个答案:

答案 0 :(得分:49)

转到@webpagebot并发送您要更新的链接(最多10个)。自动扫描您的网站并生成新的图片缩略图,网站名称和说明。

请记住<html prefix="og: http://ogp.me/ns#">标记中包含og前缀:function uploadFunction(fileType){ //CSRF attribute for spring security var token = $("meta[name='_csrf']").attr("content"); var header = $("meta[name='_csrf_header']").attr("content"); var formData = new FormData(); var fileControl = document.getElementById(fileType); var length = fileControl.files.length; for(var i = 0; i< length; i++){ formData.append('file[]',fileControl.files[i]); } formData.append('idFleet', selectedFleet); formData.append('idCar', $("#selectedCar").val()); if(fileType!='dat') formData.append('initialKm', 0); else formData.append('initialKm', $("#initialKm").val()); return jQuery.ajax({ url : 'upload', type: 'POST', timeout: 0,//unlimited timeout contentType: false, processData: false, data:formData, //Catch upload progress xhr: function() { var xhr = new window.XMLHttpRequest(); //Upload progress xhr.upload.addEventListener("progress", function(evt){ if (evt.lengthComputable) { var progress = Math.round((evt.loaded / evt.total) * 100) + '%'; //Update progress bar and text document.getElementById("fileProgressBar").style.width = progress; document.getElementById("percentualFile").innerHTML = progress; } }, false); return xhr; }, beforeSend:function(xhr) { xhr.setRequestHeader(header, token); waitingFile.showPleaseWait(); }, success: function(data,status,xhr){ //No exception occurred if (data.status){ //Also the field are right(for e.g. form value) if(data.success){ //Store information if file is datatable if (fileType=='datatable') $("#datatablePath").val(data.result[0]); notifyMessage(fileType + " has been uploaded!", 'success'); uploadResult=true; } else{ //code if there are some error into form for example } } else { notifyMessage(data.result, 'error'); $('#acquisitionWizard').bootstrapWizard('show',2);//show uploadResult=false; } }, error: function(xhr,status,e){ window.location.href = "/DART/500"; } }).complete(function() { //add timeout because otherwise user could see a too fast waiting modal setTimeout(function(){ //Reset to 0 progress bar and text document.getElementById("fileProgressBar").style.width = "0%"; document.getElementById("percentualFile").innerHTML = "0%"; waitingFile.hidePleaseWait(); }, 1000); }); } 或电报机器人不会更新图形缓存。

via telegramgeeks

答案 1 :(得分:5)

您可以在共享链接时在网址末尾添加/?v=n,其中n可以是任意数字,并且在更新后会增加。

答案 2 :(得分:0)

将纯链接发送到@webpagebot无效,因此我使用了

<meta property="og:url" content="https://mylink.com" />

它奏效了。