来自英国的客户的SOME无法看到使用Twitter api的我的模块。 当远程ilogin并检查错误时,我得到以下内容。
XMLHttpRequest无法加载http://api.getmytweets.co.uk/?screenname=philipbeel&limit=5&undefined=undefined。 Access-Control-Allow-Origin不允许原点http://plugins.theodin.co.uk。
根据stackoverflow上的另一个相关问题,我可以通过添加HTTP响应头来解决此问题,以允许Access-Control-Allow-Origin。
我该怎么做?
答案 0 :(得分:0)
我找到了解决方法。实际上是一个解决方案新的twitter API 1.1使用Oauth插件。所以有一个我从https://github.com/abraham/twitteroauth获得的PHP代码,并通过在twitter上注册一个应用程序输入了密钥,然后我使用了php生成的json,并使用jquery使用另一个javascript格式化它...
这是我从http://www.webdevdoor.com/php/authenticating-twitter-feed-timeline-oauth/
获得的解决方案非常感谢TOM