我已经实现了一个简单的 Twitter @anywhere api 示例来显示用户悬停卡片。该示例在 Internet Explorer 和 Chrome 中运行良好。但是,每当我在 Firefox 中加载页面时,我都会在警报窗口中收到以下消息:
要设置@anywhere,请提供客户 ID
当然,如果 Chrome 和 IE 中的结果是正确的,那么一切都必须正确设置吗?
这是一个简单的代码块,我测试过它仅在 Firefox 中重现问题:
<script src="http://platform.twitter.com/anywhere.js?id=WMg5kRMlIw807lRTsktnNQ&v=1" type="text/javascript" >
</script>
<script type="text/javascript">
twttr.anywhere(onAnywhereLoad);
function onAnywhereLoad(twitter) {
twitter().hovercards();
});
</script>