Getting IP of user from Tweets

40,491 views
Skip to first unread message

PRAVEEN KUMAR

unread,
Mar 11, 2010, 10:08:29 PM3/11/10
to Twitter Development Talk
Hi All,

I want to get IP address of user based on the last tweet sent by him.
Message may be sent from machine or from mobile but in both the cases
whatever IP he has used I need that in my application to find out
user's current location.

Please help me in getting this detail.Which API function can solve my
problem ?

Thanks.
(Praveen Kumar)

TJ Luoma

unread,
Mar 11, 2010, 11:17:42 PM3/11/10
to twitter-deve...@googlegroups.com

None. That information isn't available via the API, nor should it be
as it would be a major issue of privacy that I'm sure Twitter wouldn't
want to open up without explicit permission from the users.

TjL

Zac Bowling

unread,
Mar 12, 2010, 2:42:10 AM3/12/10
to twitter-deve...@googlegroups.com
The user's IP isn't available. Would be a huge security and privacy issue.

However location is possible using the new geo features. It's opt in and it requires the user use client that supports sending location data, but the accuracy is far greater then any kind of geo-ip lookup could offer. 

Zac Bowling

M. Edward (Ed) Borasky

unread,
Mar 12, 2010, 2:46:58 AM3/12/10
to twitter-deve...@googlegroups.com, Zac Bowling
Actually, the "native" Twitter web page does use your IP address to
geolocate. I haven't been able to make it work yet with Chrome, and I
haven't tried it on Windows with IE8, but on Linux, with Firefox 3.6,
Twitter "asks the browser" to determine location. Firefox does it
thusly:

http://www.mozilla.com/en-US/firefox/geolocation/

Curiously enough, I haven't found where Firefox announces what it has
figured out for your location to you. I saw the menu that *Twitter*
had of possible locations, but I didn't see anything in *Firefox* with
that list! It must be there, but I haven't found it.


--
M. Edward (Ed) Borasky
borasky-research.net/m-edward-ed-borasky/

"A mathematician is a device for turning coffee into theorems." ~ Paul Erdos

PRAVEEN KUMAR

unread,
Mar 12, 2010, 2:01:50 AM3/12/10
to twitter-deve...@googlegroups.com
If user has provided permissions in that case which API method can provide me this information.
Is it provided by new GEO functions created by Twitter. Can you please let me know the use of these functions also to get thte IP.

Thanks.

PRAVEEN KUMAR

unread,
Mar 12, 2010, 8:09:18 AM3/12/10
to twitter-deve...@googlegroups.com
Hi Zac,

can you please suggest how I can use these two new URLs. I mean what are the parameters need to be passed.

Thanks.

Raffi Krikorian

unread,
Mar 12, 2010, 10:47:28 AM3/12/10
to twitter-deve...@googlegroups.com, twitter-deve...@googlegroups.com
Nope.  There is no API to retrieve the IP address of a user.


Raffi Krikorian

unread,
Mar 12, 2010, 11:40:43 AM3/12/10
to twitter-deve...@googlegroups.com, Zac Bowling

M. Edward (Ed) Borasky

unread,
Mar 12, 2010, 1:02:23 PM3/12/10
to twitter-deve...@googlegroups.com, Raffi Krikorian, Zac Bowling
Thanks!! Incidentally, the Firefox documentation says that Firefox
doesn't store the retrieved location info anywhere, either on my
client or on Mozilla servers. It's passing whatever it got from
Google's service directly to Twitter.

So we have essentially Google and Twitter and my ISP all talking to
each other trying to figure out where I am and mostly getting it
wrong. Out of the three options Twitter gave me, two were totally
wrong and one was right only in the broadest sense - technically, my
zip code matches.

"A mathematician is a device for turning coffee into theorems." ~ Paul Erdos

Reply all
Reply to author
Forward
0 new messages