Exercise: JS Snippet APIs

In this exercise, you'll try out using several JS snippet APIs to bring more functionality into the webpage.

If you get strange security errors in the console on any step, try following these instructions to run your files over http:// instead of file://

  1. Download the starter file, or start with your own solution from the last exercise. Open the webpage up in the browser and make sure it works.
  2. Go to the Google+ button docs and generate the code for a Google+ button with no annotation and a medium size. Insert that so it shows up next to the header of the webpage(You need to run a local server to see G+ icon, read the instructions above.)
  3. Go to the Tweet button docs and read about the Tweet button. Find the HTML/SCRIPT tag for adding it, and paste that into your webpage, at the bottom near the counter.
  4. Modify the share URL or HTML according to the docs to specify hash tags and change it so that it doesn't show the counter.
  5. Bonus: Using JavaScript, generate a Tweet button for each video, and display it when the video is clicked. The text for each tweet button should be the video title.

Make sure that you use your browser developer tools to make debugging easier while working on this. Check for errors, and use console.log() to figure out how far your code makes it, and what the values of your variables are along the way.