简体   繁体   English

在Messenger中发送网址时显示带有链接的标题

[英]Display title with link when sending url in messenger

I have a website built in angular 5 that uses a unique value in the url to pull in data based on the value. 我有一个用angular 5构建的网站,该网站在url中使用唯一值根据该值提取数据。

ex) http://url.com/:id/videos 例如) http://url.com/:id/videos

When sending this link over facebook messenger the metadata passes the title and shows it in a preview under the link. 通过Facebook Messenger发送此链接时,元数据会传递标题,并在链接下方的预览中显示该标题。 I changed the value of the title, and this has changed the preview for all the :id values except one that had be sent over messenger before the code was updated 我更改了title的值,这更改了所有:id值的预览,除了在更新代码之前通过信使发送的值以外

ex) http://url.com/john/videos title = "John's Site" 例如) http://url.com/john/videos title =“约翰的网站”

http://url.com/smith/videos title = "OLD OUTDATED TITLE" http://url.com/smith/videos标题=“旧标题”

Is there a cache system or CDN built into messenger that needs to be cleared so the "smith" link will show the correct title, or am I missing something in my code that would prevent only one dynamic link to from updating? 是否需要清除Messenger中内置的缓存系统或CDN,以便“史密斯”链接显示正确的标题,还是我的代码中缺少某些内容,这些内容会阻止仅一个动态链接进行更新?

UPDATE: Facebook's debugger says I am missing the og:title. 更新:Facebook的调试器说我缺少og:title。 I have added this to my head tag 我已将此添加到我的头标签中

<meta property="og:title" content="Smith's Site" />

but I still get the same bug "Missing og:title" 但我仍然遇到相同的错误“ Missing og:title”

I know that it's possible to manually do this in this url: https://developers.facebook.com/tools/debug/ 我知道可以在以下网址中手动执行此操作: https : //developers.facebook.com/tools/debug/

You can paste there the url and then fetch new information. 您可以在其中粘贴网址,然后获取新信息。 Maybe there is an API or a service fot this, but I have never looked after. 也许有API或服务,但是我从来没有照顾过。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM