michimani / gotwi

A library for using the Twitter API v2 in the Go language. (It is still under development).
MIT License
127 stars 26 forks source link

Tweet source field is not empty #302

Closed mfreeman451 closed 1 year ago

mfreeman451 commented 1 year ago

Not sure what happened but we were seeing the "Soure" field in tweets before, now it is empty:

(struct { CreatedAt time.Time "json:\"created_at\""; AuthorID string "json:\"author_id\""; ID string "json:\"id\""; Source string "json:\"source\""; ReferencedTweets []struct { Type string "json:\"type\""; ID string "json:\"id\"" } "json:\"referenced_tweets,omitempty\""; Entities struct { URLs []struct { URL string "json:\"url\""; ExpandedURL string "json:\"expanded_url\""; DisplayURL string "json:\"display_url\"" } "json:\"urls\"" } "json:\"entities\""; Text string "json:\"text\"" }) {
 CreatedAt: (time.Time) 2022-12-23 15:00:24 +0000 UTC,
 AuthorID: (string) (len=18) "958005194398289920",
 ID: (string) (len=19) "1606303717539692544",
 Source: (string) "",
 ReferencedTweets: ([]struct { Type string "json:\"type\""; ID string "json:\"id\"" }) <nil>,
 Entities: (struct { URLs []struct { URL string "json:\"url\""; ExpandedURL string "json:\"expanded_url\""; DisplayURL string "json:\"display_url\"" } "json:\"urls\"" }) {
  URLs: ([]struct { URL string "json:\"url\""; ExpandedURL string "json:\"expanded_url\""; DisplayURL string "json:\"display_url\"" }) (len=2 cap=4) {
   (struct { URL string "json:\"url\""; ExpandedURL string "json:\"expanded_url\""; DisplayURL string "json:\"display_url\"" }) {
    URL: (string) (len=23) "https://t.co/9KYxtdZjkl",
    ExpandedURL: (string) (len=19) "http://www.sesin.at",
    DisplayURL: (string) (len=8) "sesin.at"
   },
   (struct { URL string "json:\"url\""; ExpandedURL string "json:\"expanded_url\""; DisplayURL string "json:\"display_url\"" }) {
    URL: (string) (len=23) "https://t.co/4QsOEv2LkS",
    ExpandedURL: (string) (len=85) "https://www.sesin.at/2022/12/23/cve-2022-4690-memos-up-to-0-8-x-cross-site-scripting/",
    DisplayURL: (string) (len=26) "sesin.at/2022/12/23/cve…"
   }
  }
 },
 Text: (string) (len=140) "New post from https://t.co/9KYxtdZjkl (CVE-2022-4690 | memos up to 0.8.x cross site scripting) has been published on https://t.co/4QsOEv2LkS"
}
michimani commented 1 year ago

Thank you for creating this issue.

Has there been any change in the version of gotwi you are using before or after this event occurred? If you are using the same version and there is a change in response, it may not be a problem with this library, but rather a change in the Twitter API specification.

michimani commented 1 year ago

I am closing this issue as there has been no response for a long time.

Thank you very much.