Twitter API doubt regarding place.fields

So, I’m using POSTMAN for the first time for Twitter API v2 and I’m getting some details like id, created_at, search tweets etc. but when I search using place.fields=country, geo or anything related to place.fields it does not showcase any output. Need some help regarding it.

Hi @avionics-administra7
Can you share your response body, so that we can see the structure?




So, here I gave place.fields as an input but I did not get its output.

Looks like you need to include the following in the request expansions as place is not a field that is returned by default.

&expansions=geo.place_id

It looks like place is actually a child object to the tweet resource.

This then allows you to view child objects related to place.

&place.fields=

Nope, it’s not working!! I tried beforehand only.

To use ‘place.fields’ you need to add ‘geo.place_id’ to the ‘expansions’ values, like this;

image

Without;

With;

1 Like


I did try it but it’s still showing the same thing. Is there any other reason why it might not be coming?

Thank You, got it!! For some of the tweets not geo-tagged, I think it’s not fetching the values.

Need another help!! Do you know how to get data using the BODY? I’m trying to fetch the data using the JSON but it’s not working

Can you share what you have tried so that we can understand your requirement?


So, I’ve been trying to search for a number of tweets by passing out queries and also passing the place.fields and expansions but I’m not getting the locations. So, I thought that there might be a way for fetching using the BODY and using raw data (JSON). But I don’t know how to fetch it. So need some help over here!

I’m not sure if I’m honest …

Is it possible that depending on how the tweet is posted that there may not be a location?

For example; a tweet from a phone would likely have geo-tag but a tweet from a 3rd party like Hootsuit may not publish a location for tweets?

Yeah, even I’m thinking the same thing. Thanks for all the help!!