Adapted to use separate oauth library.