I've been trying to get a specific users last tweets and the public metrics of it. In playgrounds i can easily get it but when i use tweepy i can't get public metrics.
import tweepy
auth = tweepy.OAuth2BearerHandler("token")
api = tweepy.API(auth)
client = tweepy.Client("token")
allTweets = client.get_users_tweets(900437084321832960,tweet_fields=['public_metrics',])
print(allTweets)
this returns only text and id but not public metrics
{
"id": "id",
"text": "text"
},