Every repository with this icon (
Every repository with this icon (
| Description: | Twitter-async is a high performance wrapper for Twitter's basic and OAuth API which provides parallel/asynchronous calls. Follow @apiclient for commit updates. edit |
-
0 comments Created 7 months ago by jmathaienhancementxMove EpiTwitterJson into EpiCurl as a generic JSON response object.lowxEpiTwitterJson can be used as a general JSON response object. This was original submitted by @arikfr.
Comments
-
This is in regards to a shared hosting environment where the actual calls to the Twitter api are routed through a different ip than the one specified in the cpanel(even if its dedicated). Most hosters use different inbound and outbound ip addresses. So i require to use CURLOPT_INTERFACE to specify which ip to use. (this necessary if the ip is whitelisted)
As a quick fix i've added the following code after line no. 38 in EpiTwitter.php
curl_setopt($ch, CURLOPT_INTERFACE, $_SERVER ['SERVER_ADDR']);
This fixed my problem. I hope its integrated in the next version. :-)
Regards,
AjinkyaComments
-
7 comments Created about 1 month ago by addyyenhancementxCURLOPT_FOLLOWLOCATION errors on shared serverlowxI was getting this error below when using the oauth_callback on a shared server. It wasn't stopping it from working, but just got lots of errors appearing in the page
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in ...../epitwitter/EpiOAuth.php on line 142
Adding this if statement to line 142 seems to have cured it
if (ini_get('open_basedir') == '' && ini_get('safe_mode' == 'Off'))
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);Comments
Thanks for reporting this. I'll add a general safe_mode property that can augment various behaviors.
Not sure if this is needed for Twitter anyway, commenting out this line works perfectly fine for my (limited) calls to the Twitter API.
Or is there anything expected to break, and under what conditions?The scenario is that Twitter has, in the past, resorted to doing 302 redirects when their under load. That's the only time when it will break if you don't have follow location set.
OK, good to know ... catching exceptions is always a good idea and indeed I got the plain old html fail whale page once in a while when testing the search API. The result would be useless anyway.
With the twitter api ... not catching exceptions isn't an option. I love it's simplicity but it's by far the most unstable api i've ever used :).
LOL - but then you missed the Foursquare api just before it's official release, those were fun times indeed!
-
Your code example does not work. I get a "Notice: Undefined index: X-RateLimit-Remaining" error.
Comments
Can you provide a code sample including the API you're hitting that doesn't populate the x-ratelimit-remaining header?
DieLaughing
Sat Dec 12 03:56:30 -0800 2009
| link
When using
useAsynchronous(true), I must$arr = json_decode($response->responseText, true), otherwise I have no clue how to address individual elements. I mistakenly thought that your library handled this, unless of course I am further mistaken and it does. I've tried nesting another level offoreachloops, but your examples, IMHO, could use an example of accessing this deeper structure. There is no bug, per se, but I do use your documentation as a reference, and would like to see a little more on the "asynchronous" part, given the name and all. ;-)
P.S. Unless you want me to do it.All
useAsynchronous(true)does is that it blocks before returning. The return value you get is, otherwise, identical.responseTextis always the raw response returned by the API (in this case json).responseis thejson_encodedversion ofresponseText.The library works in a manner where it blocks and populates the response only when you first try to access one of it's properties. As soon as you access any of it's properties (including
code,response, andresponseText) then it magically populates itself. Obviously this is all abstracted away (which can be good or bad).As such, synchronous and asynchronous should be treated no differently. The interface exposed is identical (literally).
I still need to look into the problem of the headersb but let me know if this helps clarify or if you still have weird issues.
-
Issue with headers and data (reported by tahpot)
0 comments Created 9 days ago by jmathaiif(isset($this->responses[$key]['data']))
http://github.com/jmathai/twitter-async/issues/closed#issue/33
Comments
-
Incorrect signature returned on Delete list memebers
1 comment Created 9 days ago by mterenzioAre others able to delete list members either with delete (with the latest code) or with post and the delete parameter.
I'm getting an EpiTwitterException incorrect signature.
Comments
Could you include the code which isn't working?
When testing against the delete list API I received incorrect signature with POST using _delete. I haven't looked into why. Using
delete()returns a 200 in the unit test. The list doesn't get deleted though. However, deleting a list via Twitter's website also appears broken. I thought the two might be related. -
safari thinks i have an invalid access_token? what.
0 comments Created 1 day ago by jacobthorntonFor some reason safari refuses to let me connect (while other browsers are just fine with this. any ideas?)
Fatal error: Uncaught exception 'EpiOAuthUnauthorizedException' with message '<?xml version="1.0" encoding="UTF-8"?> /oauth/access_token Invalid / expired Token ' in /home/content/j/a/c/jacobthornton/html/lemonade/php/twitter/EpiOAuth.php:249 Stack trace: #0 /home/content/j/a/c/jacobthornton/html/lemonade/php/twitter/EpiOAuth.php(228): EpiOAuthException::raise('<?xml version="...', 401) #1 /home/content/j/a/c/jacobthornton/html/lemonade/php/twitter/confirm2.php(11): EpiOAuthResponse->__get('oauth_token') #2 {main} thrown in /home/content/j/a/c/jacobthornton/html/lemonade/php/twitter/EpiOAuth.php on line 249
Comments











