VinShety
VinShety

Reputation: 21

Adding the Location programatically to a Tweet

I am Working with the twitter API's for Android and there is computation that happens in the cloud and based on that, the tweets are to be published. How do I add the location programatically when I tweet without the user having to input it again?

Cheers VS

Upvotes: 1

Views: 58

Answers (1)

JeffProd
JeffProd

Reputation: 3148

First of all, you need to allow your twitter account to share location :
Connect on twitter.com with your account, go to your profile settings > Settings and privacy > Privacy and safety, check : Tweet with location, and save.

Then you can post with twurl and geolocation :

twurl -X POST -H api.twitter.com '/1.1/statuses/update.json?status=Testing twurl&lat=48.858334&lon=2.294415' | jq .

Upvotes: 1

Related Questions