Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Filtered Stream] URL of images are not returned #177

Open
ethielknd opened this issue Oct 11, 2023 · 0 comments
Open

[Filtered Stream] URL of images are not returned #177

ethielknd opened this issue Oct 11, 2023 · 0 comments

Comments

@ethielknd
Copy link

I have set the Stream configuration as follow:

opts := twitter.TweetSearchStreamOpts{
  TweetFields: []twitter.TweetField{twitter.TweetFieldEntities, twitter.TweetFieldCreatedAt},
  Expansions:  []twitter.Expansion{twitter.ExpansionAuthorID, twitter.ExpansionAttachmentsMediaKeys},
  UserFields:  []twitter.UserField{twitter.UserFieldProfileImageURL},
}

I receive the Media array by doing tweet.Raw.Includes.Media, but when I make a tweet with an image, the tweet.Raw.Includes.Media[0].URL is empty
This is the log I got from tweet.Raw.Includes.Media[0]:

tweetIncludes.Media[0].AltText
tweetIncludes.Media[0].DurationMS 0
tweetIncludes.Media[0].Height 0
tweetIncludes.Media[0].Key 3_1712183042901491712
tweetIncludes.Media[0].NonPublicMetrics <nil>
tweetIncludes.Media[0].OrganicMetrics <nil>
tweetIncludes.Media[0].PreviewImageURL
tweetIncludes.Media[0].PromotedMetrics <nil>
tweetIncludes.Media[0].PublicMetrics <nil>
tweetIncludes.Media[0].Type photo
tweetIncludes.Media[0].URL
tweetIncludes.Media[0].Variants []
tweetIncludes.Media[0].Width 0

As you can see, tweetIncludes.Media[0].URL and tweetIncludes.Media[0].PreviewImageURL are empty, why is that?

@ethielknd ethielknd changed the title [Filtered Stream] [Filtered Stream] URL of images are not returned Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant