fixes: #1166272 by Dave Cohen, John Klehm: support for facebooks oauth 2. Mostly an upgrade of fixes from 6.x branch.