【发布时间】:2014-10-21 22:03:39
【问题描述】:
我已使用此处的技术将 Twitter 提要添加到 Google 协作平台网页中 http://sites.hanovernorwichschools.org/techsupport/howtos/google/embedding-a-twitter-feed-in-a-google-sites-page
小部件的代码是;
<Module>
<ModulePrefs title="Twitter" />
<Content type="html">
<![CDATA[
<a class="twitter-timeline" href="https://twitter.com/jobsnhs" data-widget- id="524499648069640192" data-chrome="nofooter noborders transparent">Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s) [0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);
js.id=id;js.src=p+"://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);
}}(document,"script","twitter-wjs");
</script>
]]>
</Content>
</Module>
这很好,但现在我想过滤结果。目前,该提要显示 NHS 中的职位空缺,我想对其进行改进以仅显示包含 BRISTOL 一词的推文。
搜索 from:jobsnhs bristol 会在 Twitter 中显示正确的结果,但当我将其嵌入 Google 协作平台时,它会返回未找到任何推文。
这是使用的代码;
<Module>
<ModulePrefs title="Twitter"/>
<Content type="html">
<![CDATA[
<a class="twitter-timeline" href="https://twitter.com/search?q=from%3Ajobsnhs+bristol" data-widget-id="524518920179302400">Tweets NHS jobs in Bristol</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);
js.id=id;js.src=p+"://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
</script>
]]>
</Content>
</Module>
我希望按包含 Bristol 一词而不是关键字 #BRISTOL 的帖子进行过滤。
【问题讨论】:
标签: twitter widget google-sites