JSFiddle - React, Tailwind, and code Playground

by codef0rmer

HTML

<!DOCTYPE html>
<html>
  <head>
  </head>

  <body>
    <script type="text/javascript">

function init() {

  // Load your API key from the Developer Console
  gapi.client.setApiKey('AIzaSyCGBTYu_N5Vn8MkMC9XvLXCQd2SF7sKSQ8');

  // Load the API
  gapi.client.load('plus', 'v1', function() {
      var request = gapi.client.plus.activities.search({
          'query': 'Google+',
            'orderby': 'best'
            });

      request.execute(function(resp) {
          // Output title
          var heading = document.createElement('h4');
          heading.appendChild(document.createTextNode(
            resp.title));
          var content = document.getElementById('content');
          content.appendChild(heading);

          // Output content of the response
          if (!resp.items) {
            content.appendChild(document.createTextNode(
              'No results found.'));
          } else {
            for (var i = 0; i < resp.items.length; i++) {
              var entry = document.createElement('p');
            entry.appendChild(document.createTextNode(
              resp.items[i].title));
              content.appendChild(entry);
            }
          }
        });
    });
 }
    </script>
    <script src="https://apis.google.com/js/client.js?onload=init"></script>

    <div id="content"></div>
  </body>
</html>