No description, website, or topics provided.
Clone or download
mgibaud
Latest commit 1b8be7d Feb 13, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
JavaScript CAPI-643 added webcomponents polyfill Jun 2, 2015
.gitignore renamed 40 -> 45 Apr 16, 2015
README.md Update README.md Feb 13, 2018

README.md

JavaScript SDK features

  • Extremely low barrier to entry - connect to the JG platform in two lines of HTML
  • New "Connect with JustGiving" button allows JG users to sign in to external apps via OAuth2 and OpenId Connect
  • Easy client-side access to Consumer API resources such as Fundraising Page creation and personalised content feeds

Example:

<script src="JG.js"></script>
<jg-login onlogin="handleLoginState" />

<script>
        JG.init({
            appId: 'bafff466',
            environment: 'sandbox'
        });
        
        function handleLoginState(result){
          if(result){
            alert('Hi, ' + result.displayName);
            
            var feed = JG.getFeed();
            // ...do something with the content feed
          }
        }
</script>