javascript – 如何从推特事件中获取Tweet ID

前端之家收集整理的这篇文章主要介绍了javascript – 如何从推特事件中获取Tweet ID前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用 Twitter web-intents / javascript API,我有点惊讶.我想做的是在发送tweet后收听一个事件.按照他们的例子:
twttr.events.bind('tweet',function(event) {
    // Do something there
});

但是,我想做的是存储tweet id或其他相关信息.如果我看事件对象,那么在data属性中似乎没有任何相关的信息.

您可以通过收听推文活动来获取推文ID(或任何其他有关鸣叫的详细信息)?

解决方法

Web Intent events exist as a mechanism to trigger functionality in your page,not a data API.

The tweet event gets fired to indicate that a Tweet has happened,but we don’t provide identifying information through the event payload: Intents function on your site without a user authorizing you access to their account,and providing a Tweet ID for an anonymous user’s action would implicitly provide you with their identity.

原文链接:https://www.f2er.com/js/153099.html

猜你在找的JavaScript相关文章