FB is not defined javascript
This would be correct, you need to use FB after the JS SDK is initialized. That being said, you definitely don´t want to call FB.api in an infinite loop, so i removed that part: Make sure you run this from an actual server, don´t just open your HTML files in a browser without at least … Read more