Update the patching of facebook framework and the related codes to support it