JFBConnect already does a check of the document type to ensure that the output is set to HTML. If it's not, that script code shouldn't be included in the page. The specific line we use is:
if (!JFactory::getApplication()->isAdmin() && JFactory::getDocument()->getType() == 'html')
If the script file is still being added, it seems like EasySocial is not properly setting the document type to 'amp' or some other variant that we could detect. You may need to contact them to understand how best to handle this situation. There have been multiple attempts to add native AMP support to Joomla, but for now, each extension does their own thing.
JFBConnect specifically looks if the document type is changed to something other than HTML, which is the only signal we can use that the script tags shouldn't be added. That methodology does work for some other extensions that support AMP output.
I hope that helps explain. If you hear something back from the guys at StackIdeas, definitely let us know as we'll gladly help investigate however we can.
Thanks,
Alex