简体   繁体   English

如何与 facebook 上的图像共享链接

[英]How to share a link with image on facebook

I'm trying to make link button that shares the page on facebook, I'm using that url from facebook https://www.facebook.com/sharer/sharer.php?u= . I'm trying to make link button that shares the page on facebook, I'm using that url from facebook https://www.facebook.com/sharer/sharer.php?u= . The problem is the page I want to share has a dynamic image, so depending on the parameters in my url the image should be different, for example events.com?id=2, this should bring an image related to event 2 and so on, so I can't put the meta tag on my head.问题是我要分享的页面有动态图像,所以根据我的url中的参数,图像应该不同,例如events.com?id=2,这应该带来与事件2相关的图像等等,所以我不能把元标记放在我的头上。 I was trying to add the meta tag after I receive the data from my database using jquery but it doesn't work.在我使用 jquery 从我的数据库接收数据后,我试图添加元标记,但它不起作用。 any suggestion?有什么建议吗?

You need to add meta tags to your page.您需要将meta标记添加到您的页面。 More info in the following documentation以下文档中的更多信息

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

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