issue #5592:refactor facebook plugin and fix bugs of dialog callback