Re: [twitter-dev] Re: Geo-caching Without Lat/Long

2010-06-24 Thread Matt Harris
Hey Bryan,

Thanks for sharing the solution with the list. Glad it's working for you
now.
Matt

On Thu, Jun 24, 2010 at 12:52 PM, Bryan  wrote:

> Interesting; thank you. I found the solution using your information.
> Basically, PHP acts funny with raw utf characters, and in reality I
> needed to pass three hex characters like so:
>
> $message =
> sprintf("1234567890123412345678901234123456789012341234567890123412345678901234123456789012341234567890123412345678901234123456789012341234567890123\xE2\x80\xA6");
> //
> utf(ellipsis)
>
> Note the three hex characters on the end, and the 139 numbers
> proceeding it. This returned a 200 and actually tweeted.
>
> Thanks again everyone.
>
> On Jun 24, 2:05 pm, Taylor Singletary 
> wrote:
> > Hey Brian,
> >
> > I don't know enough about the internals of Abraham's library to know how
> it
> > handles UTF-8 characters when generating POST bodies or signature base
> > strings, but here's an example of successfully tweeting with the UTF-8
> > ellipsis:
> >
> > I'm pretty surprised at how the status is encoded in the base string in
> this
> > example (kind of cargo culting it), but there may also be other alternate
> > and valid ways of specifying it. Definitely not intuitive. Here's the
> > published status:http://twitter.com/oauth_dancer/status/16952668541
> >
> > URLhttp://api.twitter.com/1/statuses/update.xml
> >
> > POST body
> > status=Unicode+ellipsis+are+fun:+…
> >
> > Signature Base String
> > POST&http%3A%2F%2Fapi.twitter.com
> >
> %2F1%2Fstatuses%2Fupdate.xml&oauth_consumer_key%3Dri8JxYK2ddwSV5xIUfNNvQ%26
> oauth_nonce%3D965MjJOs4kef7MBA8QggxIJHHzyRbMlnQ3WTB7VNV0%26oauth_signature_
> method%3DHMAC-SHA1%26oauth_timestamp%3D1277405988%26oauth_token%3D119476949
> -gF0B5O1Wwa2UqqIwopAhQtQVTzmfSIOSiHQS7Vf8%26oauth_version%3D1.0%26status%3D
> Unicode%2520ellipsis%2520are%2520fun%253A%2520%25E2%2580%25A6
> >
> > Authorization Header
> > OAuth oauth_nonce="LnME61XWvwjp3ORhhLd5MMEb9EDO1DeYIsb7HfhoeE4",
> > oauth_signature_method="HMAC-SHA1", oauth_timestamp="1277394877",
> > oauth_consumer_key="ri8JxYK2ddwSV5xIUfNNvQ",
> > oauth_token="819797-torCkTs0XK7H2Y2i1ee5iofqkMC4p7aayeEXRTmlw",
> > oauth_signature="UKwl3lVQygmKAMsIffFCWlLQaeg%3D", oauth_version="1.0"
> >
> > Which returns a XML status representation with the ellipsis:
> >
> > Unicode ellipsis are fun: …
> >
> >
> >
> > On Thu, Jun 24, 2010 at 11:48 AM, Bryan  wrote:
> > > Certainly:
> >
> > >  >
> > > require_once('twitteroauth.php');
> >
> > > $message = "This is an @test … "; // utf(ellipsis)
> > > //$message = "This is an @test ... "; // ascii(three periods)
> > > echo $message."";
> >
> > > $message = strlen($message) > 140 ? substr($message,0,140) : $message;
> >
> > > $connection = new TwitterOAuth("X", "X", "X", "X");
> > > $status = $connection->post('statuses/update', array('status' =>
> > > $message));
> > > echo $connection->http_code == 200 ? "SUCCESS" : "FAIL";
> >
> > > ?>
> >
> > > As you can see, I'm using Abraham's oauth library and my sensitive
> > > data has been sanitized. Thanks again.
> >
> > > On Jun 24, 12:19 pm, Matt Harris  wrote:
> > > > Hey Bryan,
> >
> > > > Can you share the code you are using to send the Tweet, and if
> possible
> > > the
> > > > post body sent by your code.
> >
> > > > Thanks,
> > > > Matt
> >
> > > > On Thu, Jun 24, 2010 at 10:06 AM, Bryan 
> wrote:
> > > > > Great; thanks for the clarification Matt. But I'm still having
> trouble
> > > > > actually tweeting UTF-8 characters. If I tweet this:
> >
> > > > > "This is an @test … "
> >
> > > > > without quotes where you can see an actual ellipsis (single UTF-8
> > > > > character), I get a successful response code (200), but nothing is
> > > > > actually tweeted. If I tweet this:
> >
> > > > > "This is an @test ... "
> >
> > > > > without quotes where you can see just three dots, I get a
> successful
> > > > > response code (200), and the tweet is actually successful.
> >
> > > > > On Jun 23, 4:14 pm, themattharris 
> wrote:
> > > > > > To clarify the situation with UTF-8 characters.
> >
> > > > > > Special UTF-8 characters are treated the same as the standard
> > > > > > alphanumeric set, in that we will count each one as a single
> letter.
> > > > > > So a string like "wondering what's happening …" will be treated
> as 27
> > > > > > characters (without the quotes).
> >
> > > > > > When we receive a Tweet with UTF-8 characters in it we convert
> them
> > > > > > into their HTML entity representation to ensure consistency
> between
> > > > > > clients and reliable storage in the databases. This means, when
> you
> > > > > > query the API, you may notice the Tweet has more than 140
> characters
> > > > > > in it. This is expected and is a result of the UTF-8 conversion.
> >
> > > > > > You can read more about how we count characters on the
> dev.twitter
> > > > > > site [1].
> >
> > > > > > Hope that answers your questions,
> > > > > > Matt
> >
> > > > > > 1.http://dev.twitter.com/pages/counting_characters
> >
> > >

[twitter-dev] Re: Geo-caching Without Lat/Long

2010-06-24 Thread Bryan
Interesting; thank you. I found the solution using your information.
Basically, PHP acts funny with raw utf characters, and in reality I
needed to pass three hex characters like so:

$message =
sprintf("1234567890123412345678901234123456789012341234567890123412345678901234123456789012341234567890123412345678901234123456789012341234567890123\xE2\x80\xA6");
 //
utf(ellipsis)

Note the three hex characters on the end, and the 139 numbers
proceeding it. This returned a 200 and actually tweeted.

Thanks again everyone.

On Jun 24, 2:05 pm, Taylor Singletary 
wrote:
> Hey Brian,
>
> I don't know enough about the internals of Abraham's library to know how it
> handles UTF-8 characters when generating POST bodies or signature base
> strings, but here's an example of successfully tweeting with the UTF-8
> ellipsis:
>
> I'm pretty surprised at how the status is encoded in the base string in this
> example (kind of cargo culting it), but there may also be other alternate
> and valid ways of specifying it. Definitely not intuitive. Here's the
> published status:http://twitter.com/oauth_dancer/status/16952668541
>
> URLhttp://api.twitter.com/1/statuses/update.xml
>
> POST body
> status=Unicode+ellipsis+are+fun:+…
>
> Signature Base String
> POST&http%3A%2F%2Fapi.twitter.com
> %2F1%2Fstatuses%2Fupdate.xml&oauth_consumer_key%3Dri8JxYK2ddwSV5xIUfNNvQ%26 
> oauth_nonce%3D965MjJOs4kef7MBA8QggxIJHHzyRbMlnQ3WTB7VNV0%26oauth_signature_ 
> method%3DHMAC-SHA1%26oauth_timestamp%3D1277405988%26oauth_token%3D119476949 
> -gF0B5O1Wwa2UqqIwopAhQtQVTzmfSIOSiHQS7Vf8%26oauth_version%3D1.0%26status%3D 
> Unicode%2520ellipsis%2520are%2520fun%253A%2520%25E2%2580%25A6
>
> Authorization Header
> OAuth oauth_nonce="LnME61XWvwjp3ORhhLd5MMEb9EDO1DeYIsb7HfhoeE4",
> oauth_signature_method="HMAC-SHA1", oauth_timestamp="1277394877",
> oauth_consumer_key="ri8JxYK2ddwSV5xIUfNNvQ",
> oauth_token="819797-torCkTs0XK7H2Y2i1ee5iofqkMC4p7aayeEXRTmlw",
> oauth_signature="UKwl3lVQygmKAMsIffFCWlLQaeg%3D", oauth_version="1.0"
>
> Which returns a XML status representation with the ellipsis:
>
> Unicode ellipsis are fun: …
>
>
>
> On Thu, Jun 24, 2010 at 11:48 AM, Bryan  wrote:
> > Certainly:
>
> > 
> > require_once('twitteroauth.php');
>
> > $message = "This is an @test … "; // utf(ellipsis)
> > //$message = "This is an @test ... "; // ascii(three periods)
> > echo $message."";
>
> > $message = strlen($message) > 140 ? substr($message,0,140) : $message;
>
> > $connection = new TwitterOAuth("X", "X", "X", "X");
> > $status = $connection->post('statuses/update', array('status' =>
> > $message));
> > echo $connection->http_code == 200 ? "SUCCESS" : "FAIL";
>
> > ?>
>
> > As you can see, I'm using Abraham's oauth library and my sensitive
> > data has been sanitized. Thanks again.
>
> > On Jun 24, 12:19 pm, Matt Harris  wrote:
> > > Hey Bryan,
>
> > > Can you share the code you are using to send the Tweet, and if possible
> > the
> > > post body sent by your code.
>
> > > Thanks,
> > > Matt
>
> > > On Thu, Jun 24, 2010 at 10:06 AM, Bryan  wrote:
> > > > Great; thanks for the clarification Matt. But I'm still having trouble
> > > > actually tweeting UTF-8 characters. If I tweet this:
>
> > > > "This is an @test … "
>
> > > > without quotes where you can see an actual ellipsis (single UTF-8
> > > > character), I get a successful response code (200), but nothing is
> > > > actually tweeted. If I tweet this:
>
> > > > "This is an @test ... "
>
> > > > without quotes where you can see just three dots, I get a successful
> > > > response code (200), and the tweet is actually successful.
>
> > > > On Jun 23, 4:14 pm, themattharris  wrote:
> > > > > To clarify the situation with UTF-8 characters.
>
> > > > > Special UTF-8 characters are treated the same as the standard
> > > > > alphanumeric set, in that we will count each one as a single letter.
> > > > > So a string like "wondering what's happening …" will be treated as 27
> > > > > characters (without the quotes).
>
> > > > > When we receive a Tweet with UTF-8 characters in it we convert them
> > > > > into their HTML entity representation to ensure consistency between
> > > > > clients and reliable storage in the databases. This means, when you
> > > > > query the API, you may notice the Tweet has more than 140 characters
> > > > > in it. This is expected and is a result of the UTF-8 conversion.
>
> > > > > You can read more about how we count characters on the dev.twitter
> > > > > site [1].
>
> > > > > Hope that answers your questions,
> > > > > Matt
>
> > > > > 1.http://dev.twitter.com/pages/counting_characters
>
> > > > > On Jun 11, 3:18 pm, Sam Ramji  wrote:
>
> > > > > > We've built a free tool with similar capabilities but including
> > OAuth
> > > > > > authentication and contextual links to the full Twitter API, and no
> > > > > > login required in order to save API calls.
>
> > > > > > You can see the same lat/long query here:
>
> >http://app.apigee.com/console/5ffbfabd-04c0-4802-a71d-542c23a1ec0e/re.
> > > > 

Re: [twitter-dev] Re: Geo-caching Without Lat/Long

2010-06-24 Thread Taylor Singletary
Hey Brian,

I don't know enough about the internals of Abraham's library to know how it
handles UTF-8 characters when generating POST bodies or signature base
strings, but here's an example of successfully tweeting with the UTF-8
ellipsis:

I'm pretty surprised at how the status is encoded in the base string in this
example (kind of cargo culting it), but there may also be other alternate
and valid ways of specifying it. Definitely not intuitive. Here's the
published status: http://twitter.com/oauth_dancer/status/16952668541

URL
http://api.twitter.com/1/statuses/update.xml

POST body
status=Unicode+ellipsis+are+fun:+…

Signature Base String
POST&http%3A%2F%2Fapi.twitter.com
%2F1%2Fstatuses%2Fupdate.xml&oauth_consumer_key%3Dri8JxYK2ddwSV5xIUfNNvQ%26oauth_nonce%3D965MjJOs4kef7MBA8QggxIJHHzyRbMlnQ3WTB7VNV0%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1277405988%26oauth_token%3D119476949-gF0B5O1Wwa2UqqIwopAhQtQVTzmfSIOSiHQS7Vf8%26oauth_version%3D1.0%26status%3DUnicode%2520ellipsis%2520are%2520fun%253A%2520%25E2%2580%25A6

Authorization Header
OAuth oauth_nonce="LnME61XWvwjp3ORhhLd5MMEb9EDO1DeYIsb7HfhoeE4",
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1277394877",
oauth_consumer_key="ri8JxYK2ddwSV5xIUfNNvQ",
oauth_token="819797-torCkTs0XK7H2Y2i1ee5iofqkMC4p7aayeEXRTmlw",
oauth_signature="UKwl3lVQygmKAMsIffFCWlLQaeg%3D", oauth_version="1.0"

Which returns a XML status representation with the ellipsis:

Unicode ellipsis are fun: …

On Thu, Jun 24, 2010 at 11:48 AM, Bryan  wrote:

> Certainly:
>
> 
> require_once('twitteroauth.php');
>
> $message = "This is an @test … "; // utf(ellipsis)
> //$message = "This is an @test ... "; // ascii(three periods)
> echo $message."";
>
> $message = strlen($message) > 140 ? substr($message,0,140) : $message;
>
> $connection = new TwitterOAuth("X", "X", "X", "X");
> $status = $connection->post('statuses/update', array('status' =>
> $message));
> echo $connection->http_code == 200 ? "SUCCESS" : "FAIL";
>
> ?>
>
> As you can see, I'm using Abraham's oauth library and my sensitive
> data has been sanitized. Thanks again.
>
> On Jun 24, 12:19 pm, Matt Harris  wrote:
> > Hey Bryan,
> >
> > Can you share the code you are using to send the Tweet, and if possible
> the
> > post body sent by your code.
> >
> > Thanks,
> > Matt
> >
> >
> >
> >
> >
> > On Thu, Jun 24, 2010 at 10:06 AM, Bryan  wrote:
> > > Great; thanks for the clarification Matt. But I'm still having trouble
> > > actually tweeting UTF-8 characters. If I tweet this:
> >
> > > "This is an @test … "
> >
> > > without quotes where you can see an actual ellipsis (single UTF-8
> > > character), I get a successful response code (200), but nothing is
> > > actually tweeted. If I tweet this:
> >
> > > "This is an @test ... "
> >
> > > without quotes where you can see just three dots, I get a successful
> > > response code (200), and the tweet is actually successful.
> >
> > > On Jun 23, 4:14 pm, themattharris  wrote:
> > > > To clarify the situation with UTF-8 characters.
> >
> > > > Special UTF-8 characters are treated the same as the standard
> > > > alphanumeric set, in that we will count each one as a single letter.
> > > > So a string like "wondering what's happening …" will be treated as 27
> > > > characters (without the quotes).
> >
> > > > When we receive a Tweet with UTF-8 characters in it we convert them
> > > > into their HTML entity representation to ensure consistency between
> > > > clients and reliable storage in the databases. This means, when you
> > > > query the API, you may notice the Tweet has more than 140 characters
> > > > in it. This is expected and is a result of the UTF-8 conversion.
> >
> > > > You can read more about how we count characters on the dev.twitter
> > > > site [1].
> >
> > > > Hope that answers your questions,
> > > > Matt
> >
> > > > 1.http://dev.twitter.com/pages/counting_characters
> >
> > > > On Jun 11, 3:18 pm, Sam Ramji  wrote:
> >
> > > > > We've built a free tool with similar capabilities but including
> OAuth
> > > > > authentication and contextual links to the full Twitter API, and no
> > > > > login required in order to save API calls.
> >
> > > > > You can see the same lat/long query here:
> >
> > > > >
> http://app.apigee.com/console/5ffbfabd-04c0-4802-a71d-542c23a1ec0e/re.
> > > ..
> >
> > > > > Hope this is helpful - we are seeking feedback on the tool if you
> have
> > > > > any.
> >
> > > > > Thanks,
> >
> > > > > Sam
> >
> > > > > On Jun 11, 9:48 am, Bryan  wrote:
> >
> > > > > > Hey Abraham. The above example is dated. My point is appending
> > > > > > max_result=1 onto any verified result results in a 404:
> >
> > >http://hurl.it/hurls/08a6b684b494cab6138754d7b7470d9895968d59/88bbdc8.
> ..
> >
> > > > > > is okay, but with max_results=1:
> >
> > >http://hurl.it/hurls/df8773b96e453cfd5426123c3ba4354fc2d96769/6d952ea.
> ..
> >
> > > > > > returns a 404
> >
> > > > > > Thanks for the link; that's a very useful tool!
> >
> > > > > > On Jun 11, 11:40 am, 

[twitter-dev] Re: Geo-caching Without Lat/Long

2010-06-24 Thread Bryan
Certainly:

";

$message = strlen($message) > 140 ? substr($message,0,140) : $message;

$connection = new TwitterOAuth("X", "X", "X", "X");
$status = $connection->post('statuses/update', array('status' =>
$message));
echo $connection->http_code == 200 ? "SUCCESS" : "FAIL";

?>

As you can see, I'm using Abraham's oauth library and my sensitive
data has been sanitized. Thanks again.

On Jun 24, 12:19 pm, Matt Harris  wrote:
> Hey Bryan,
>
> Can you share the code you are using to send the Tweet, and if possible the
> post body sent by your code.
>
> Thanks,
> Matt
>
>
>
>
>
> On Thu, Jun 24, 2010 at 10:06 AM, Bryan  wrote:
> > Great; thanks for the clarification Matt. But I'm still having trouble
> > actually tweeting UTF-8 characters. If I tweet this:
>
> > "This is an @test … "
>
> > without quotes where you can see an actual ellipsis (single UTF-8
> > character), I get a successful response code (200), but nothing is
> > actually tweeted. If I tweet this:
>
> > "This is an @test ... "
>
> > without quotes where you can see just three dots, I get a successful
> > response code (200), and the tweet is actually successful.
>
> > On Jun 23, 4:14 pm, themattharris  wrote:
> > > To clarify the situation with UTF-8 characters.
>
> > > Special UTF-8 characters are treated the same as the standard
> > > alphanumeric set, in that we will count each one as a single letter.
> > > So a string like "wondering what's happening …" will be treated as 27
> > > characters (without the quotes).
>
> > > When we receive a Tweet with UTF-8 characters in it we convert them
> > > into their HTML entity representation to ensure consistency between
> > > clients and reliable storage in the databases. This means, when you
> > > query the API, you may notice the Tweet has more than 140 characters
> > > in it. This is expected and is a result of the UTF-8 conversion.
>
> > > You can read more about how we count characters on the dev.twitter
> > > site [1].
>
> > > Hope that answers your questions,
> > > Matt
>
> > > 1.http://dev.twitter.com/pages/counting_characters
>
> > > On Jun 11, 3:18 pm, Sam Ramji  wrote:
>
> > > > We've built a free tool with similar capabilities but including OAuth
> > > > authentication and contextual links to the full Twitter API, and no
> > > > login required in order to save API calls.
>
> > > > You can see the same lat/long query here:
>
> > > >http://app.apigee.com/console/5ffbfabd-04c0-4802-a71d-542c23a1ec0e/re.
> > ..
>
> > > > Hope this is helpful - we are seeking feedback on the tool if you have
> > > > any.
>
> > > > Thanks,
>
> > > > Sam
>
> > > > On Jun 11, 9:48 am, Bryan  wrote:
>
> > > > > Hey Abraham. The above example is dated. My point is appending
> > > > > max_result=1 onto any verified result results in a 404:
>
> >http://hurl.it/hurls/08a6b684b494cab6138754d7b7470d9895968d59/88bbdc8...
>
> > > > > is okay, but with max_results=1:
>
> >http://hurl.it/hurls/df8773b96e453cfd5426123c3ba4354fc2d96769/6d952ea...
>
> > > > > returns a 404
>
> > > > > Thanks for the link; that's a very useful tool!
>
> > > > > On Jun 11, 11:40 am, Abraham Williams <4bra...@gmail.com> wrote:
>
> > > > > > The lat/long you are passing to the API are in the Yellow Sea so
> > Twitter is
> > > > > > 404ing as it does not have any places near there.
>
> >http://hurl.it/hurls/db27e3e9bce56f7f9a8209b935af6a25d5fa5677/2775b26...
>
> > > > > > Abraham
> > > > > > -
> > > > > > Abraham Williams | Hacker Advocate |http://abrah.am
> > > > > > @abraham |http://projects.abrah.am|http://blog.abrah.am
> > > > > > This email is: [ ] shareable [x] ask first [ ] private.
>
> > > > > > On Fri, Jun 11, 2010 at 07:28, Bryan  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 
> > 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
> > rever

Re: [twitter-dev] Re: Geo-caching Without Lat/Long

2010-06-24 Thread Matt Harris
Hey Bryan,

Can you share the code you are using to send the Tweet, and if possible the
post body sent by your code.

Thanks,
Matt

On Thu, Jun 24, 2010 at 10:06 AM, Bryan  wrote:

> Great; thanks for the clarification Matt. But I'm still having trouble
> actually tweeting UTF-8 characters. If I tweet this:
>
> "This is an @test … "
>
> without quotes where you can see an actual ellipsis (single UTF-8
> character), I get a successful response code (200), but nothing is
> actually tweeted. If I tweet this:
>
> "This is an @test ... "
>
> without quotes where you can see just three dots, I get a successful
> response code (200), and the tweet is actually successful.
>
> On Jun 23, 4:14 pm, themattharris  wrote:
> > To clarify the situation with UTF-8 characters.
> >
> > Special UTF-8 characters are treated the same as the standard
> > alphanumeric set, in that we will count each one as a single letter.
> > So a string like "wondering what's happening …" will be treated as 27
> > characters (without the quotes).
> >
> > When we receive a Tweet with UTF-8 characters in it we convert them
> > into their HTML entity representation to ensure consistency between
> > clients and reliable storage in the databases. This means, when you
> > query the API, you may notice the Tweet has more than 140 characters
> > in it. This is expected and is a result of the UTF-8 conversion.
> >
> > You can read more about how we count characters on the dev.twitter
> > site [1].
> >
> > Hope that answers your questions,
> > Matt
> >
> > 1.http://dev.twitter.com/pages/counting_characters
> >
> > On Jun 11, 3:18 pm, Sam Ramji  wrote:
> >
> >
> >
> > > We've built a free tool with similar capabilities but including OAuth
> > > authentication and contextual links to the full Twitter API, and no
> > > login required in order to save API calls.
> >
> > > You can see the same lat/long query here:
> >
> > >http://app.apigee.com/console/5ffbfabd-04c0-4802-a71d-542c23a1ec0e/re.
> ..
> >
> > > Hope this is helpful - we are seeking feedback on the tool if you have
> > > any.
> >
> > > Thanks,
> >
> > > Sam
> >
> > > On Jun 11, 9:48 am, Bryan  wrote:
> >
> > > > Hey Abraham. The above example is dated. My point is appending
> > > > max_result=1 onto any verified result results in a 404:
> >
> > > >
> http://hurl.it/hurls/08a6b684b494cab6138754d7b7470d9895968d59/88bbdc8...
> >
> > > > is okay, but with max_results=1:
> >
> > > >
> http://hurl.it/hurls/df8773b96e453cfd5426123c3ba4354fc2d96769/6d952ea...
> >
> > > > returns a 404
> >
> > > > Thanks for the link; that's a very useful tool!
> >
> > > > On Jun 11, 11:40 am, Abraham Williams <4bra...@gmail.com> wrote:
> >
> > > > > The lat/long you are passing to the API are in the Yellow Sea so
> Twitter is
> > > > > 404ing as it does not have any places near there.
> >
> > > > >
> http://hurl.it/hurls/db27e3e9bce56f7f9a8209b935af6a25d5fa5677/2775b26...
> >
> > > > > Abraham
> > > > > -
> > > > > Abraham Williams | Hacker Advocate |http://abrah.am
> > > > > @abraham |http://projects.abrah.am|http://blog.abrah.am
> > > > > This email is: [ ] shareable [x] ask first [ ] private.
> >
> > > > > On Fri, Jun 11, 2010 at 07:28, Bryan  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 
> 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 
> 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
> > > > > 

[twitter-dev] Re: Geo-caching Without Lat/Long

2010-06-24 Thread Bryan
Great; thanks for the clarification Matt. But I'm still having trouble
actually tweeting UTF-8 characters. If I tweet this:

"This is an @test … "

without quotes where you can see an actual ellipsis (single UTF-8
character), I get a successful response code (200), but nothing is
actually tweeted. If I tweet this:

"This is an @test ... "

without quotes where you can see just three dots, I get a successful
response code (200), and the tweet is actually successful.

On Jun 23, 4:14 pm, themattharris  wrote:
> To clarify the situation with UTF-8 characters.
>
> Special UTF-8 characters are treated the same as the standard
> alphanumeric set, in that we will count each one as a single letter.
> So a string like "wondering what's happening …" will be treated as 27
> characters (without the quotes).
>
> When we receive a Tweet with UTF-8 characters in it we convert them
> into their HTML entity representation to ensure consistency between
> clients and reliable storage in the databases. This means, when you
> query the API, you may notice the Tweet has more than 140 characters
> in it. This is expected and is a result of the UTF-8 conversion.
>
> You can read more about how we count characters on the dev.twitter
> site [1].
>
> Hope that answers your questions,
> Matt
>
> 1.http://dev.twitter.com/pages/counting_characters
>
> On Jun 11, 3:18 pm, Sam Ramji  wrote:
>
>
>
> > We've built a free tool with similar capabilities but including OAuth
> > authentication and contextual links to the full Twitter API, and no
> > login required in order to save API calls.
>
> > You can see the same lat/long query here:
>
> >http://app.apigee.com/console/5ffbfabd-04c0-4802-a71d-542c23a1ec0e/re...
>
> > Hope this is helpful - we are seeking feedback on the tool if you have
> > any.
>
> > Thanks,
>
> > Sam
>
> > On Jun 11, 9:48 am, Bryan  wrote:
>
> > > Hey Abraham. The above example is dated. My point is appending
> > > max_result=1 onto any verified result results in a 404:
>
> > >http://hurl.it/hurls/08a6b684b494cab6138754d7b7470d9895968d59/88bbdc8...
>
> > > is okay, but with max_results=1:
>
> > >http://hurl.it/hurls/df8773b96e453cfd5426123c3ba4354fc2d96769/6d952ea...
>
> > > returns a 404
>
> > > Thanks for the link; that's a very useful tool!
>
> > > On Jun 11, 11:40 am, Abraham Williams <4bra...@gmail.com> wrote:
>
> > > > The lat/long you are passing to the API are in the Yellow Sea so 
> > > > Twitter is
> > > > 404ing as it does not have any places near there.
>
> > > >http://hurl.it/hurls/db27e3e9bce56f7f9a8209b935af6a25d5fa5677/2775b26...
>
> > > > Abraham
> > > > -
> > > > Abraham Williams | Hacker Advocate |http://abrah.am
> > > > @abraham |http://projects.abrah.am|http://blog.abrah.am
> > > > This email is: [ ] shareable [x] ask first [ ] private.
>
> > > > On Fri, Jun 11, 2010 at 07:28, Bryan  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  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  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 
> > > > > > 

[twitter-dev] Re: Geo-caching Without Lat/Long

2010-06-23 Thread themattharris
To clarify the situation with UTF-8 characters.

Special UTF-8 characters are treated the same as the standard
alphanumeric set, in that we will count each one as a single letter.
So a string like "wondering what's happening …" will be treated as 27
characters (without the quotes).

When we receive a Tweet with UTF-8 characters in it we convert them
into their HTML entity representation to ensure consistency between
clients and reliable storage in the databases. This means, when you
query the API, you may notice the Tweet has more than 140 characters
in it. This is expected and is a result of the UTF-8 conversion.

You can read more about how we count characters on the dev.twitter
site [1].

Hope that answers your questions,
Matt

1. http://dev.twitter.com/pages/counting_characters

On Jun 11, 3:18 pm, Sam Ramji  wrote:
> We've built a free tool with similar capabilities but including OAuth
> authentication and contextual links to the full Twitter API, and no
> login required in order to save API calls.
>
> You can see the same lat/long query here:
>
> http://app.apigee.com/console/5ffbfabd-04c0-4802-a71d-542c23a1ec0e/re...
>
> Hope this is helpful - we are seeking feedback on the tool if you have
> any.
>
> Thanks,
>
> Sam
>
> On Jun 11, 9:48 am, Bryan  wrote:
>
>
>
> > Hey Abraham. The above example is dated. My point is appending
> > max_result=1 onto any verified result results in a 404:
>
> >http://hurl.it/hurls/08a6b684b494cab6138754d7b7470d9895968d59/88bbdc8...
>
> > is okay, but with max_results=1:
>
> >http://hurl.it/hurls/df8773b96e453cfd5426123c3ba4354fc2d96769/6d952ea...
>
> > returns a 404
>
> > Thanks for the link; that's a very useful tool!
>
> > On Jun 11, 11:40 am, Abraham Williams <4bra...@gmail.com> wrote:
>
> > > The lat/long you are passing to the API are in the Yellow Sea so Twitter 
> > > is
> > > 404ing as it does not have any places near there.
>
> > >http://hurl.it/hurls/db27e3e9bce56f7f9a8209b935af6a25d5fa5677/2775b26...
>
> > > Abraham
> > > -
> > > Abraham Williams | Hacker Advocate |http://abrah.am
> > > @abraham |http://projects.abrah.am|http://blog.abrah.am
> > > This email is: [ ] shareable [x] ask first [ ] private.
>
> > > On Fri, Jun 11, 2010 at 07:28, Bryan  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  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  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


[twitter-dev] Re: Geo-caching Without Lat/Long

2010-06-11 Thread Sam Ramji
We've built a free tool with similar capabilities but including OAuth
authentication and contextual links to the full Twitter API, and no
login required in order to save API calls.

You can see the same lat/long query here:

http://app.apigee.com/console/5ffbfabd-04c0-4802-a71d-542c23a1ec0e/rendersnapshotview

Hope this is helpful - we are seeking feedback on the tool if you have
any.

Thanks,

Sam

On Jun 11, 9:48 am, Bryan  wrote:
> Hey Abraham. The above example is dated. My point is appending
> max_result=1 onto any verified result results in a 404:
>
> http://hurl.it/hurls/08a6b684b494cab6138754d7b7470d9895968d59/88bbdc8...
>
> is okay, but with max_results=1:
>
> http://hurl.it/hurls/df8773b96e453cfd5426123c3ba4354fc2d96769/6d952ea...
>
> returns a 404
>
> Thanks for the link; that's a very useful tool!
>
> On Jun 11, 11:40 am, Abraham Williams <4bra...@gmail.com> wrote:
>
>
>
> > The lat/long you are passing to the API are in the Yellow Sea so Twitter is
> > 404ing as it does not have any places near there.
>
> >http://hurl.it/hurls/db27e3e9bce56f7f9a8209b935af6a25d5fa5677/2775b26...
>
> > Abraham
> > -
> > Abraham Williams | Hacker Advocate |http://abrah.am
> > @abraham |http://projects.abrah.am|http://blog.abrah.am
> > This email is: [ ] shareable [x] ask first [ ] private.
>
> > On Fri, Jun 11, 2010 at 07:28, Bryan  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  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  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


[twitter-dev] Re: Geo-caching Without Lat/Long

2010-06-11 Thread Bryan
Done. Any suggestions for the UTF encoding?

On Jun 11, 11:57 am, Abraham Williams <4bra...@gmail.com> wrote:
> Interestingly max_resuls=2 
> works:http://hurl.it/hurls/6521ca0d04a03b5c340682f275d8d013834b8518/8020ff7...
>
> Might as well file a bug 
> report:http://code.google.com/p/twitter-api/issues/list
>
> Abraham
> -
> Abraham Williams | Hacker Advocate |http://abrah.am
> @abraham |http://projects.abrah.am|http://blog.abrah.am
> This email is: [ ] shareable [x] ask first [ ] private.
>
>
>
> On Fri, Jun 11, 2010 at 09:48, Bryan  wrote:
> > Hey Abraham. The above example is dated. My point is appending
> > max_result=1 onto any verified result results in a 404:
>
> >http://hurl.it/hurls/08a6b684b494cab6138754d7b7470d9895968d59/88bbdc8...
>
> > is okay, but with max_results=1:
>
> >http://hurl.it/hurls/df8773b96e453cfd5426123c3ba4354fc2d96769/6d952ea...
>
> > returns a 404
>
> > Thanks for the link; that's a very useful tool!
>
> > On Jun 11, 11:40 am, Abraham Williams <4bra...@gmail.com> wrote:
> > > The lat/long you are passing to the API are in the Yellow Sea so Twitter
> > is
> > > 404ing as it does not have any places near there.
>
> > >http://hurl.it/hurls/db27e3e9bce56f7f9a8209b935af6a25d5fa5677/2775b26...
>
> > > Abraham
> > > -
> > > Abraham Williams | Hacker Advocate |http://abrah.am
> > > @abraham |http://projects.abrah.am|http://blog.abrah.am
> > > This email is: [ ] shareable [x] ask first [ ] private.
>
> > > On Fri, Jun 11, 2010 at 07:28, Bryan  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  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  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


Re: [twitter-dev] Re: Geo-caching Without Lat/Long

2010-06-11 Thread Abraham Williams
Interestingly max_resuls=2 works:
http://hurl.it/hurls/6521ca0d04a03b5c340682f275d8d013834b8518/8020ff7c547eab6c510b5f368375e8b01c1684b7

Might as well file a bug report:
http://code.google.com/p/twitter-api/issues/list

Abraham
-
Abraham Williams | Hacker Advocate | http://abrah.am
@abraham | http://projects.abrah.am | http://blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.


On Fri, Jun 11, 2010 at 09:48, Bryan  wrote:

> Hey Abraham. The above example is dated. My point is appending
> max_result=1 onto any verified result results in a 404:
>
>
> http://hurl.it/hurls/08a6b684b494cab6138754d7b7470d9895968d59/88bbdc8743d17b7f3feb78094aba93098c592240
>
> is okay, but with max_results=1:
>
>
> http://hurl.it/hurls/df8773b96e453cfd5426123c3ba4354fc2d96769/6d952eaf331c0ecac3d8ec7d7fc9dc76d18e62d6
>
> returns a 404
>
> Thanks for the link; that's a very useful tool!
>
> On Jun 11, 11:40 am, Abraham Williams <4bra...@gmail.com> wrote:
> > The lat/long you are passing to the API are in the Yellow Sea so Twitter
> is
> > 404ing as it does not have any places near there.
> >
> > http://hurl.it/hurls/db27e3e9bce56f7f9a8209b935af6a25d5fa5677/2775b26...
> >
> > Abraham
> > -
> > Abraham Williams | Hacker Advocate |http://abrah.am
> > @abraham |http://projects.abrah.am|http://blog.abrah.am
> > This email is: [ ] shareable [x] ask first [ ] private.
> >
> >
> >
> > On Fri, Jun 11, 2010 at 07:28, Bryan  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  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  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
>


[twitter-dev] Re: Geo-caching Without Lat/Long

2010-06-11 Thread Bryan
Hey Abraham. The above example is dated. My point is appending
max_result=1 onto any verified result results in a 404:

http://hurl.it/hurls/08a6b684b494cab6138754d7b7470d9895968d59/88bbdc8743d17b7f3feb78094aba93098c592240

is okay, but with max_results=1:

http://hurl.it/hurls/df8773b96e453cfd5426123c3ba4354fc2d96769/6d952eaf331c0ecac3d8ec7d7fc9dc76d18e62d6

returns a 404

Thanks for the link; that's a very useful tool!

On Jun 11, 11:40 am, Abraham Williams <4bra...@gmail.com> wrote:
> The lat/long you are passing to the API are in the Yellow Sea so Twitter is
> 404ing as it does not have any places near there.
>
> http://hurl.it/hurls/db27e3e9bce56f7f9a8209b935af6a25d5fa5677/2775b26...
>
> Abraham
> -
> Abraham Williams | Hacker Advocate |http://abrah.am
> @abraham |http://projects.abrah.am|http://blog.abrah.am
> This email is: [ ] shareable [x] ask first [ ] private.
>
>
>
> On Fri, Jun 11, 2010 at 07:28, Bryan  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  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  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


Re: [twitter-dev] Re: Geo-caching Without Lat/Long

2010-06-11 Thread Abraham Williams
The lat/long you are passing to the API are in the Yellow Sea so Twitter is
404ing as it does not have any places near there.

http://hurl.it/hurls/db27e3e9bce56f7f9a8209b935af6a25d5fa5677/2775b260053e31ce25c46a87d56ced51f8583b43

Abraham
-
Abraham Williams | Hacker Advocate | http://abrah.am
@abraham | http://projects.abrah.am | http://blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.


On Fri, Jun 11, 2010 at 07:28, Bryan  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  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  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
>


[twitter-dev] Re: Geo-caching Without Lat/Long

2010-06-11 Thread Bryan
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  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  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  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  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


Re: [twitter-dev] Re: Geo-caching Without Lat/Long

2010-06-11 Thread Matt Harris

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, Twitter
http://twitter.com/themattharris

On Jun 11, 2010, at 15:28, Bryan  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  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  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


[twitter-dev] Re: Geo-caching Without Lat/Long

2010-06-11 Thread Bryan
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  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  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