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.
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 bryan.p...@gmail.com wrote:
Great; thanks for the clarification Matt. But I'm still having trouble
actually tweeting UTF-8
Certainly:
?php
require_once('twitteroauth.php');
$message = This is an @test … ; // utf(ellipsis)
//$message = This is an @test ... ; // ascii(three periods)
echo $message.br /;
$message = strlen($message) 140 ? substr($message,0,140) : $message;
$connection = new TwitterOAuth(X, X, X, X);
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
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 =
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 bryan.p...@gmail.com wrote:
Interesting; thank you. I found the solution using your information.
Basically, PHP acts funny with raw utf characters, and in
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
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' =
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
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 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 |
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:
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
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
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:
15 matches
Mail list logo