cleans up access-token-parsefn in github and facebook examples