AddThis 动态 URL
我向某个外部站点发送 POST,该站点会输出一个 URL,我使用 bit.ly 截断该 URL。我想以某种方式获取该 URL 并将其用于 AddThis 中的自定义 URL 字段。
关于我该如何解决这个问题有什么想法吗?
I do a POST to some external site, that site spits out a URL, which I truncate using bit.ly. I want to somehow get that URL and use it for the custom URL fields in AddThis.
Any ideas on how I can go about this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
查看 jQuery ajax 方法 获取 url
take a look at jQuery ajax methods to get the url
在 AJAX 调用返回 URL
http://support.addthis.com/customer/portal/articles/381263-addthis-client-api#rendering-js
此代码片段应该可以帮助您入门:
I would render the button with javascript after the AJAX call returns the URL
http://support.addthis.com/customer/portal/articles/381263-addthis-client-api#rendering-js
This snippet should get you started:
我尝试了很多上述解决方案,但没有一个对我有用,采用了类似这样的
$('.addthis_toolbar').attr('addthis:url', 'http://google.com');< /code>
为此,您需要 AddThis div 看起来像这样
I tried a lot of the above solutions and none worked for me, went with something like this
$('.addthis_toolbar').attr('addthis:url', 'http://google.com');
For this to work you'll need the AddThis div to look like this
<div class="addthis_toolbox addthis_default_style addthis_32x32_style share-bar" addthis:url="">