Ahh I see. Thank you. I hope you don't mind the barrage of questions
but I have 2 more. For starters, max_results=1 doesn't appear to work.
When I append it to any valid url, I get a 404 status return. Second,
I'm having no luck with UTF encoding. I wish to encode my string to
take advantage of the ellipsis (...) as a single character to save my
precious 140.

Now, when I use php's built in utf8_encode function as such:
utf8_encode("$title...$url");, only the url gets tweeted. I know I
wrote ... here, but I used the ellipsis character in my php source.

Also, the old documentation says that utf encoded tweets are escaped
with two additional characters <> that DO take away from the 140
limit. The new documentation hints at the opposite. What's the
verdict?

Thanks Matt!

On Jun 11, 10:56 am, Matt Harris <[email protected]> wrote:
> Hi Bryan
>
> The geo/reverse_geocode method only supports json so make sure you are  
> using that and not XML.
>
> Also, the method doesn't require authorisation so there is no need to  
> send the oauth tokens.
>
> Hope that helps,
>
> Matt Harris
> Developer Advocate, Twitterhttp://twitter.com/themattharris
>
> On Jun 11, 2010, at 15:28, Bryan <[email protected]> wrote:
>
>
>
> > Matt--
>
> > Okay thanks for the reply. I'm building a news aggregator so the goal
> > was to enter the location manually. Still, I'm having trouble with the
> > geo-coding method. I'm using Abraham's php library and I do the
> > following:
>
> >    $location = $connection->get('geo/reverse_geocode', array('lat' =>
> > '37.75' , 'long' => '122.68'));
> >    echo $connection->http_code;
>
> > Which returns 404. $location->id is empty. Any thoughts as to what I'm
> > doing wrong?
>
> > On Jun 11, 9:21 am, Matt Harris <[email protected]> wrote:
> >> Hey Bryan,
>
> >> Status updates only accept lat/long or place_id. There isn't a way of
> >> providing plain text locations for these fields. If you wish to  
> >> display a
> >> textual representation of where someone is on your app you would  
> >> need to
> >> carry out a reverse geocode first.
>
> >> I don't know the method you are using to obtain the location but  
> >> generally
> >> we see developers use the lat/long returned by the browser or device.
>
> >> One thing that might be useful to know is that we perform a reverse  
> >> lookup
> >> on the lat/long when we display the tweet, converting it to some  
> >> textual
> >> description like "SoMa, San Francisco", or "from here" as  
> >> appropriate.
>
> >> Hope that answers your question,
> >> Matt
>
> >> On Fri, Jun 11, 2010 at 6:41 AM, Bryan <[email protected]> wrote:
> >>> Hey everyone, is there a way to geo-tweet with the API without  
> >>> knowing
> >>> the Lat/Long? In other words, can I say "San Francisco, CA" or  
> >>> search
> >>> for valid place_id's with this name? I'm trying to make my user
> >>> interface as user-friendly as possible, and asking for lat/long  
> >>> for my
> >>> userbase won't work. I also want to rely on as few as API's as
> >>> possible, so I'd prefer not to run my name through Google's Map API
> >>> and then through the reverse geocode API on twitters. Thanks.
>
> >> --
>
> >> Matt Harris
> >> Developer Advocate, Twitterhttp://twitter.com/themattharris

Reply via email to