Skip to content

Instantly share code, notes, and snippets.

@unisys12
Last active December 21, 2015 20:19
Show Gist options
  • Save unisys12/6360061 to your computer and use it in GitHub Desktop.
Save unisys12/6360061 to your computer and use it in GitHub Desktop.
AngularJS resource that should pull activities from a users Google+ account using their ID
function plusCtrl($scope, $resource){
$scope.UserID = '<!-- User ID Here! -->';
$scope.Key = '<!-- GoogleAPI Access Key Here! -->';
$scope.Activity = $resource(
'https://www.googleapis.com/plus/v1/people/:id/activities/public?key=:key&callback=JSON_CALLBACK',
{
id: $scope.UserID, key: $scope.Key
},
{
get: {method: 'JSONP'}
});
$scope.plusFeed = $scope.Activity.get();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment