when i use twitterv2.go to get the user profile, something wrong.(the current twitterv2 api changed?)
user.Description = user.RawData["description"].(string) user.AvatarURL = user.RawData["profile_image_url"].(string) user.UserID = user.RawData["id"].(string) user.Location = user.RawData["location"].(string)
because there was no 'description' inside of the user.RawData.
user.RawData only had "id,name,username"
if we want to get "descrition,profile_image_url,location",we should change the code:
Original:
response, err := p.consumer.Get( endpointProfile, nil, sess.AccessToken)
when i clone code to local, i find this bug was fixed.
when i use twitterv2.go to get the user profile, something wrong.(the current twitterv2 api changed?)
user.Description = user.RawData["description"].(string) user.AvatarURL = user.RawData["profile_image_url"].(string) user.UserID = user.RawData["id"].(string) user.Location = user.RawData["location"].(string)
because there was no 'description' inside of the user.RawData.user.RawData only had "id,name,username" if we want to get "descrition,profile_image_url,location",we should change the code:
Original:
response, err := p.consumer.Get( endpointProfile, nil, sess.AccessToken)
when i clone code to local, i find this bug was fixed.we need a new tag contain this 'fix'