Can I send a Twitter answering machine without GPS tracking?

I want to send an automatic response to user tweets from my iOS application, I can do this if the user allowed the iOS application to access his location, but when the user is allowed access to the location, the tweeter does not allow sending an automatic response to tweets.

I am wondering if I need to have access to the user's location to send an automatic response to his tweets. Or do we have a reliable way to perform the specified functionality without access to the user's location?

+8
ios cocoa-touch twitter
source share
2 answers

I have not implemented it yet, but I can assume that Twitter is doing this to avoid spam or robot tweets. Therefore, if Twitter receives several automatic tweets from the same place, therefore, it considers them to be spam.

What you can do is after every 8-10 tweets create a new latitude longitude and send this location to Twitter using automatic tweet.

How?

Take the default location (lat, long), and you can find the addition of 500 m-1 km in this place every 8-10 tweets and use this new place for the next time. This method is not reliable, but may work in your case.

Note. Use this method only if you cannot find the location of the device.

+1
source share

OP, from what I understand, you want to know the given location of the user without the consent of access to the location services of the user.

A way to do this, rather than a super reliable one, I would add, is to reverse-geolocate their IP address using the server-side geocoding API.

Remember that it is not super reliable, but it can do the trick. You may encounter problems on mobile phones, especially due to the erratic nature of their IP addresses.

Twitter itself has an API to help with this. For example, you can use the GET geo-search to find the identifier of the place closest to a given IP address using this:

https://dev.twitter.com/rest/reference/get/geo/search

and then you can use this place id to find out the approximate Lat / Long of the user using GET geo / id /: place_id:

https://dev.twitter.com/rest/reference/get/geo/id/%3Aplace_id

(there are probably more direct ways to do this in other APIs as well, but I assume that you have already authenticated with the twitter API, so I'm trying to give you something easier to integrate into your code)

Let me know if this helps.

+2
source share

All Articles