add user's full name
This commit is contained in:
parent
5081b46f68
commit
21d595ff42
3 changed files with 6 additions and 0 deletions
|
|
@ -155,9 +155,11 @@ type timeline struct {
|
|||
func (timeline *timeline) parseTweet(id string) *Tweet {
|
||||
if tweet, ok := timeline.GlobalObjects.Tweets[id]; ok {
|
||||
username := timeline.GlobalObjects.Users[tweet.UserIDStr].ScreenName
|
||||
name := timeline.GlobalObjects.Users[tweet.UserIDStr].Name
|
||||
tw := &Tweet{
|
||||
ID: id,
|
||||
Likes: tweet.FavoriteCount,
|
||||
Name: name,
|
||||
PermanentURL: fmt.Sprintf("https://twitter.com/%s/status/%s", username, id),
|
||||
Replies: tweet.ReplyCount,
|
||||
Retweets: tweet.RetweetCount,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue