Haughin’s Twitter Library - Accessing the current user's username. |
[eluser]luisfmgoncalves[/eluser]
Hey, I'm not sure if I will anwser the right question, but I hope so... For me is like, after a user login, I store his twitter id in the session. So, when I need to get the use information from twitter I just do: Code: $id = $this->session->userdata('id'); With this, I have the JSON information in $user_info variable. After that, to retrieve the information I just do: Code: if($user_info != NULL){ So, in $data you will have the name, url, location and description of a user (you can retrieve more information, just look at the JSON file structure here: http://apiwiki.twitter.com/Twitter-REST-...hod:-users show) in the end, you just need: Code: echo json_encode($data); or Code: $this->load->view('some_view', $data); Is this what you want? Luis Gonçalves |
Welcome Guest, Not a member yet? Register Sign In |