Twitter 分享按钮之间的区别
我只是想在我的页面上添加情侣分享按钮。我看到人们推荐不同的方法:
我看到一些文章使用 home?status
:
<a href=”http://twitter.com/home?status=Currently reading <?php the_permalink(); ?>” title=”Click to send this page to Twitter!” target=”_blank” rel=”nofollow”>Share on Twitter</a>
和一些使用 share?url
:
<a href="http://twitter.com/share?url=http%3A%2F%2Fdev.twitter.com%2Fpages%2Ftweet-button" target="_blank">Tweet</a>
有什么区别?
I simply want to add couple share button onto my page. And I see that people recommend different ways of doing it:
I see some articles using home?status
:
<a href=”http://twitter.com/home?status=Currently reading <?php the_permalink(); ?>” title=”Click to send this page to Twitter!” target=”_blank” rel=”nofollow”>Share on Twitter</a>
and some using share?url
:
<a href="http://twitter.com/share?url=http%3A%2F%2Fdev.twitter.com%2Fpages%2Ftweet-button" target="_blank">Tweet</a>
What's the difference?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的第一个示例只是使用您输入的文本更新状态。第二个示例具有更多功能。
share?url
支持锚标记的类属性。在锚标记中,您可以添加诸如数据相关
之类的内容来建议用户在共享内容后关注的帐户,或者如果您不提供网址,它将查找调用的当前网址从中产生并分享。与简化的home?status
调用相比,它具有更多的功能。在这里找到更多信息:https://dev.twitter.com/docs/tweet-button
Your first example simply updates the status with the text you enter. The second example has a lot more functionality.
share?url
supports class attributes for the anchor tag. In the anchor tag you can add things likedata-related
to suggest accounts the user will follow after they share the content or if you don't supply a url it will look for the current url the call is being generated from and share that. It has a lot more functionality vs the dumbed downhome?status
call.find more here: https://dev.twitter.com/docs/tweet-button