added FBApis.py and its unit tests