refactoring oauth in book_pings