简体   繁体   English

在没有meta og标签的情况下在facebook共享上指定图像,文本和标题

[英]Specifying image, text and title on facebook share without meta og tags

I'm trying to build in a facebook share button on a news section of a site. 我正在尝试在网站的新闻栏目上建立一个Facebook分享按钮。 I would like to specify which picture, title and text to use for the share. 我想指定用于共享的图片,标题和文本。

Due to limitations in the cms that the website uses i can't add the open graph meta in the header of the page. 由于网站使用的cms的限制,我不能在页面的标题中添加开放图元。 I've tried updating the og meta with javascript and just adding them in the body instead to no success. 我尝试用javascript更新og元,只是在体内添加它们而不是成功。

Is there any other way to specify image, title and text in facebook share using just xslt or client side tech like javascript? 有没有其他方法在Facebook分享中使用xslt或客户端技术如javascript指定图像,标题和文本?

To my knowledge, you can't do this with share buttons. 据我所知,您无法使用共享按钮执行此操作。 However, you can get similar functionality out of stream.publish . 但是,您可以从stream.publish中获得类似的功能。

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

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