WordPress 和 Tiny Url 中的 Twitter 状态
我有一个 WordPress 网站。我在每个帖子下面都有一个 Twitter 按钮。我想要的是,当用户点击它时,它应该将他们的 Twitter 状态更新为以下内容:
the_title().urlencode(get_permalink()) [首先是用户单击 Twitter 按钮的帖子标题,然后是帖子的 url]
我的问题是 urlencode(get_permalink()) 的输出非常大,并且在 Twitter 状态中它仅显示纯文本不是预期的超链接。我在某个地方读到过有关小网址的内容。但是应该使用什么代码来将我的 url 传递给tiny url 并获取它的缩短版本,以便超链接在我的 Twitter 状态中处于活动状态。
提前致谢!
I have a wordpress site. I have a twitter button below every post. What I want is that when a user clicks on it, it should update their twitter status to the following:
the_title().urlencode(get_permalink())
[first the title of the post on which the user clicked the twitter button followed by the url of the post]
mow my problem is that the output from urlencode(get_permalink()) is very large and in the twitter status it displays just plain text not the hyperlink as is expected. Somewhere i read about tiny url. But what should be the code to pass my url to tiny url and get the shortened version of it so that the hyperlink is active in my twitter status.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了解决方案。感谢您花时间查看此内容。考虑发布答案以防万一其他人遇到类似的情况
I found the solution. Thanks if you spent time to view this. Thought to post the answer just in case anyone else faces similar situation