Ok- do you want to export from a skinned mesh renderer or a normal mesh renderer?
Hmm that Unity code includes "using UnityEditor;" so that code sample doesn't work at runtime-
It says " Currently a custom importer/exporter needs to be written in order to do so, as the FBX Exporter is Editor only."
I'm not that good at coding yet but I'll see what I can do