MeNeedz Twitter |
[eluser]BobbyB[/eluser]
Ok, I kind of got it working now. Code: function statuses_user_timeline($user_id = FALSE) Code: return array($response[0], json_decode($response[1],true));//In the "parse_response" function I added true Maybe somebody knows a better way.
[eluser]BobbyB[/eluser]
Hi Waldmeister, I got another question for you: I am trying to get the latest tweets from a user like this: Code: $this->load->library('twitter'); Using: Code: ... Thanks in advance!
[eluser]davidbehler[/eluser]
$this->twitter->statuses_user_timeline() expects the user_id as parameter. Right now it's not possible to get the latest tweets by passing the actual username. Try this quick update to the library: Code: function statuses_user_timeline($values = FALSE) In your case you could try this: Code: $this->twitter->statuses_user_timeline(array('screen_name' => 'bob'));
[eluser]BobbyB[/eluser]
Hi, thanks for the quick reply. Turns out it does actually work, but it just takes forever(3-5 minutes). Same with the updated script. This guy here seems to have the same problem with a script very similar: link An alternative using curl would be great ![]() Best regards
[eluser]davidbehler[/eluser]
There are plenty of cURL Twitter libraries out there...I just don't like using them as my webhoster does not support cURL and that means I have to use fsockopen and so on.
[eluser]BobbyB[/eluser]
Oh I see, but does the script work for you? I don't get why it works great without parameters but it doesn't when I pass parameters. Strange...
[eluser]takasia[/eluser]
Hi there! I really thank you for a great library - got it working and posting in no time. :-) I have a question - don't know much about codeigniter and all - but I want to get some of the user data - like location. How can I do that? What I want to do is: someone logs in with his twitter login and password, and gets a google map with the people he follows as markers with their last tweet in the marker bubble. For this I need their [location] parameter and their tweet [text] - but how to obtain them? It's not for any project - I'm just trying to learn and setting myself some goals :-)
[eluser]davidbehler[/eluser]
I'm not sure this can be done easily, but if you have a look at the Twitter API you might find something: statuses-friends-timeline and [url=http://apiwiki.twitter.com/Twitter-REST-API-Method:-statuses-home_timeline]statuses-home-timeline] return a list of the last 20-200 statuses of your friends (the later includes retweets). For each friend you either get the geo info or not...depending on wether they have that feature enabled or not. I haven't looked into this library for a while but it shouldn't be to complicated and ca be expanded easily.
[eluser]takasia[/eluser]
Thank you thank you thank you! :-) I added this to your library: function statuses_friends_timeline($user_id = FALSE) { $post_values = array(); if($user_id !== FALSE) { $post_values['id'] = $user_id; } $result = $this->request('GET', 'statuses/friends_timeline', TRUE, $post_values); if(is_array($result)) { return $result[1]; } else { return FALSE; } } then did this: $timeline = $this->twitter->statuses_friends_timeline(); and got what I wanted :-) I mean - I can extract from the timeline whatever I need :-) I wanted to try to give the location info krom the timeline to GoogleMaps API and show it on the map BUT.... one problem.... the GEO function in Twitter is for now aviable only in US! :-( I live in Japan so... :down: Thank you anyway :-D -- Kasia Twitter: @kasia @joomla_cms_info
[eluser]Naveen Reddy[/eluser]
Hi, Thanks for the twitter library. I would like to know, How can we use this library to access the number of followers and the list of followers into our site. thanks |
Welcome Guest, Not a member yet? Register Sign In |