0
首先,我正在研究我的tweetganic應用程序需要訪問Twitter流媒體API,客戶端,並通過AngularJS管理結果。訪問JSON數據與AngularJS和Twitter流媒體API
這是我的CoffeeScript/JS:
OPTIONS https://stream.twitter.com/1.1/statuses/filter.json 401 (Unauthorized) angular.js:9231
(anonymous function) angular.js:9231
sendReq angular.js:9066
$http angular.js:8857
$http.(anonymous function) angular.js:9012
$scope.doSearch twitter_accounts.js:9
(anonymous function) angular.js:6299
(anonymous function) angular.js:12880
Scope.$eval angular.js:7994
Scope.$apply angular.js:8074
$delegate.__proto__.$apply localhost:500
(anonymous function) angular.js:12879
(anonymous function) angular.js:1959
forEach angular.js:134
eventHandler angular.js:1958
XMLHttpRequest cannot load https://stream.twitter.com/1.1/statuses/filter.json. Origin http://localhost:3000 is not allowed by Access-Control-Allow-Origin.
爲什麼我沒有得到如何:
@AccountCtrl = ["$scope", "$http", ($scope, $http) ->
$scope.doSearch = ->
$scope.twitter = $http.post("https://tweetganic:[email protected]/1.1/statuses/filter.json",
track: $scope.searchTerm)
]
我,當我點擊運行doSearch()按鈕在控制檯中此錯誤通過角度打開與Twitter流API的連接?
庫:https://github.com/brianpetro/tweetganic