// GetLoginURL provides a state-specific login URL for the user to login to.
// CAUTION: This must be called before GetProfileData() as this enforces state.
GetLoginURL provides a state-specific login URL for the user to login to.
CAUTION: This must be called before GetProfileData() as this enforces state.
// GetLoginURL provides a state - specific login URL for the user to login to . // CAUTION : This must be called before GetProfileData () as this enforces state .
func GetLoginURL(w http.ResponseWriter, r *http.Request) string {
	state := generateState()
	session, _ := store.Get(r, "golinkedinapi")
	session.Values["state"] = state
	defer session.Save(r, w)
	return authConf.AuthCodeURL(state)
}
func GetLoginURL ( w http . ResponseWriter , r * http . Request ) string { state := generateState ( ) session , _ := store . Get ( r , " " ) session . Values [ " " ] = state defer session . Save ( r , w ) return authConf . AuthCodeURL ( state ) }
GetLoginURL provides a state-specific login URL for the user to login to.
GetLoginURL provides a state - specific login URL for the user to login to .
// The only time this will error out is if the session cannot be decoded, however // we don't care about that as we can simply change state.