Facebook login from webView on iOS

Has anyone faced an issue with Facebook login flow where there is context switching from the app to Facebook WEBVIEW and sendkeys() does not type the text into the username/password fields. Also, the tap is not functional.

here’s my code:

FB_EMAIL_XPATH = “//[contains(@value, ‘Email or Phone’)]”
FB_PASSWORD_XPATH = “//[contains(@value, ‘Password’)]”
FB_LOGIN_BUTTON_XPATH = “//*[contains(@name, ‘Log In’)]”

print self.driver.find_element_by_xpath(self.FB_EMAIL_XPATH).text # this prints “Email or phone”
self.driver.find_element_by_xpath(self.FB_EMAIL_XPATH).click() # test gets stuck at this step
self.type_text(By.XPATH, self.FB_PASSWORD_XPATH, password)

I have exactly the same issue. Still didn’t find solution. Check Appium 1.4.7.