Skip to main content

Activity

commented on Cannot obtain auth token
Literally the minute after posting this the same command above started to work. Any ideas why it would have be inoperable before?
posted 2013-11-18 18:58:19 -0800
commented on Is JSONP enabled in the API?
Thanks for the heads up. Is there a reason for this? How should one retrieve an access_token programmatically in JavaScript?

Trying this with the people endpoint did work bringing back data, but it does not seem to have sent it back within a callback, just the pure JSON (eg "Uncaught SyntaxError: Unexpected token : " error, http://stackoverflow.com/questions/7936610/json-uncaught-syntaxerror-unexpected-token).

Here is the smallest test case in Angular I could come up with:

function PersonCtrl ($scope, $http, $log) {
$http.jsonp(‘https://chimera.nationbuilder.com/api/v1/people?callback=JSON_CALLBACK’, {
method: ‘GET’,
params: {
access_token: ‘ACCESS_TOKEN_HERE’
}
})
.success(function (data, status, headers, config) {
$log.log(data, status, config);
})
.error(function (data, status, headers, config) {
$log.log(data, status, config);
});
}
posted 2013-11-19 19:20:55 -0800