示例#1
0
// Authenticate
func Authenticate(s *session.Session, code string) {
	decoder := s.Auth(code)

	//Decode request
	var auth Auth
	err := decoder.Decode(&auth)
	if err != nil {
		panic(err)
	}

	s.SetAuth(auth.Access_token, auth.User.Id)

}