I think the issue regarding this -- and I may be out of the loop on an update -- is that the end point of "http://api.twitter.com/1/search<http://www.google.com/url?sa=D&q=http://api.twitter.com/1/search>" is gone.
Thus, when you construct the url using Abraham's library, you get a url with http://api.twitter.com/1/search <goog_1157391411> as the host instead of using http://search.twitter.com/search On Mon, Feb 28, 2011 at 11:10 AM, Chris Sobolewski < sobolewski.ch...@gmail.com> wrote: > Thanks, I originally started out formatting the twitter query with an > array, as you suggest, the final result here is a product of trouble > shooting to get more than just an empty screen. > > I will give this a try. Thank you. > > On Feb 28, 2:03 pm, Abraham Williams <4bra...@gmail.com> wrote: > > The Search API does not support authentication and so TwitterOAuth does > not > > currently support it. TwitterOAuth useshttps://api.twitter.com/1/as the > > API URL when the Search API useshttp://search.twitter.comas > documentedhttp://dev.twitter.com/doc/get/search. > > > > To use the Search API I recommend performing a simple cURL request > instead. > > > > Also in general TwitterOAuth requests should formated like > > > > $query = $twitteroauth->get("search", array("q" => $q, "rpp" =>100)>; > > > > instead of > > > > $query = $twitteroauth->get("search.json?q={$q}&rpp=100"); > > > > Finally the integers returned are larger then 32bit PHP supports. In > > officially supported Twitter API methods most id elements have a matching > > id_str element that is a string. > > > > Abraham > > ------------- > > Abraham Williams | Hacker Advocate | abrah.am > > <http://abrah.am>Just launched from Answerly <http://answerly.com>: > > InboxQ<http://inboxq.com>for Chrome > > @abraham <https://twitter.com/abraham> | github.com/abraham | > blog.abrah.am > > This email is: [ ] shareable [x] ask first [ ] private. > > > > On Mon, Feb 28, 2011 at 10:15, Chris Sobolewski > > <sobolewski.ch...@gmail.com>wrote: > > > > > > > > > > > > > > > > > I am attempting to use the twitteroauth library to make a query, and I > > > am getting some odd responses back. > > > > > My code: > > > $twitteroauth = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET); > > > $q=urlencode("#twitter"); > > > $query = $twitteroauth->get("search.json?q={$q}&rpp=100"); > > > echo "<pre>"; > > > $qq = $query; > > > print_r($qq); > > > echo "</pre>"; > > > > > First odd result is, when I try doing a JSON decode, I get an error > > > that it is not JSON which is what I expected to get back. > > > > > Second odd result is when I print_r, this is what I recieve back: > > > > > stdClass Object > > > ( > > > [created_in] => 0.11146 > > > [statuses] => Array > > > ( > > > [0] => 4.2285483207823E+16 > > > [1] => 4.2285478212403E+16 > > > [2] => 4.2285477021237E+16 > > > [3] => 4.228546655225E+16 > > > [4] => 4.2285444607648E+16 > > > [5] => 4.2285433509528E+16 > > > [6] => 4.2285433383559E+16 > > > .... so on all the way down to 100 > > > ) > > > ) > > > > > -- > > > Twitter developer documentation and resources: > http://dev.twitter.com/doc > > > API updates via Twitter:http://twitter.com/twitterapi > > > Issues/Enhancements Tracker: > > >http://code.google.com/p/twitter-api/issues/list > > > Change your membership to this group: > > >http://groups.google.com/group/twitter-development-talk > > -- > Twitter developer documentation and resources: http://dev.twitter.com/doc > API updates via Twitter: http://twitter.com/twitterapi > Issues/Enhancements Tracker: > http://code.google.com/p/twitter-api/issues/list > Change your membership to this group: > http://groups.google.com/group/twitter-development-talk > -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk