我刚刚偶然发现在 Facebook / LinkedIn 上将文本(主题标签)与文本一起共享。这是我正在尝试做的事情(标签:#STUFF):
<li class="facebook"><a target="_blank" href="http://www.facebook.com/share.php?u=<?php echo '#STUFF'. urlencode(get_the_permalink()); ?>">facebook</a></li>
不幸的是,这不起作用(难怪!)
有“说点什么吧”FB 上的字段。我可以在共享按钮中添加一段代码以便该字段包含文本吗(非常类似于电子邮件发送的“主题”)。
我可以通过 Twitter 做到这一点。像这样:
<li class="twitter"><a target="_blank" href="https://twitter.com/intent/tweet?text=<?php echo urlencode(get_the_title() . ', #STUFF'); ?>&url=<?php echo urlencode(get_the_permalink()); ?>&original_referer=<?php ?>">twitter</a></li>
虽然我不确定其他服务,但您可以使用此格式在 LinkedIn 上自定义共享文本(请注意,所有{}
占位符值应替换为 URL 编码值):
<a href="https://www.linkedin.com/shareArticle?mini=true&url={URL to share}&title={article title}&summary={article summary}&source={your app/website name}">Link text</a>
E.g.
<a href="https://www.linkedin.com/shareArticle?mini=true&url=http://developer.linkedin.com&title=LinkedIn%20Developer%20Network&summary=My%20favorite%20developer%20program&source=LinkedIn">Link text</a>
可以在此处找到共享内容的完整文档:https://developer.linkedin.com/docs/share-on-linkedin https://developer.linkedin.com/docs/share-on-linkedin
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)