Your only remaining code-level issue is this one: "Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."
You need to properly configure your Facebook app at https://developers.facebook.com/ so that the API code and the URL match. Unfortunately, Pixelunion has not provided you with that functionality. It's not a big deal, you're just losing out on social metrics data (if you even wanted to mine it). We can't get rid of the warning without additional script mods though.