0

I'm building some basic Twitter functionality into my app, and am using the JTwitter JAR to read and set status.

It looks like there is a User class that can be used to set the location, but I just can't figure out how to set it with my GPS coordinates once I've got my Twitter object.

Has anyone been able to set the user.location property using JTwitter?

Thanks, -Gregg

Chris
  • 10,337
  • 1
  • 38
  • 46
Gregg Reno
  • 441
  • 4
  • 15

2 Answers2

1

Sorry for the omission!

I've just added support for setting your location to the latest version (v1.6.2). See Twitter.setMyLocation().

NB - location based searches are handled separately via setSearchLocation(), as they need long, lat and radius.

Daniel Winterstein
  • 2,418
  • 1
  • 29
  • 41
0

It would appear that JTwitter doesn't support this.

The Twitter API method /statuses/update takes lat and long arguments (or a single place_id argument) to specify the location.

Looking at the source (line ~2500), the updateStatus method of JTwitter only passes the status, source and in_reply_to_status_id arguments. You'll need to modify the JTwitter source to pass the lat/long arguments if you want to geotag your tweets.

Chris
  • 10,337
  • 1
  • 38
  • 46