Last active
December 21, 2015 20:19
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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