Welcome Guest, Not a member yet? Register   Sign In
MeNeedz Twitter
#31

[eluser]davidbehler[/eluser]
Numer of followers:
Build a custom function just like takasia did and call the users/show method from the Twitter API.

List of followers:
I guess for that you would have to call statuses/followers, again with a custom functin you build.

The library is very flexible, using the request() method you can get pretty all you want from Twitter.
#32

[eluser]Naveen Reddy[/eluser]
I know it will sound silly, but how do i get the user id of a user using twitter api?!
#33

[eluser]takasia[/eluser]
Hi waldmeister!

I have another question.
Can I use z OAuth with your library?
If yes - could you tell me how?

Thanks a lot in advance :-)

Kasia
#34

[eluser]davidbehler[/eluser]
Mh..I'm sorry, I've yet to work with oAuth.

If oAuth requires some kind of request send by you, then it should be doable. Otherwise I don't know.

Have you checked the forum for oAuth implementations?
#35

[eluser]Naveen Reddy[/eluser]
I have managed to interact with twitter, but as a response i am getting an array, now how should i parse that array. It is also giving error of stdclass cant be used as a string.
Thanks in advance.
#36

[eluser]davidbehler[/eluser]
Where does the error happen? In my library or somewhere in your code?

what does a var_dump or print_r of the array show?
#37

[eluser]Naveen Reddy[/eluser]
Your library is working absolutely fine... There's nothing with that, I just used your method to access user_timeline in the controller and as a response i got an array. I want to pass this array to show the username and time when he tweeted etc. In short I just want to parse the array returned from the call.

thanks.
#38

[eluser]davidbehler[/eluser]
What does the array look like?
My library takes the json response from the twitter api and turns it into an array, because arrays are easier to work with than json strings.
#39

[eluser]Naveen Reddy[/eluser]
Code:
array(15) {
  [0]=>
  object(stdClass)#12 (14) {
    ["coordinates"]=>
    NULL
    ["truncated"]=>
    bool(false)
    ["contributors"]=>
    NULL
    ["source"]=>
    string(3) "web"
    ["created_at"]=>
    string(30) "Thu Jun 24 11:17:11 +0000 2010"
    ["geo"]=>
    NULL
    ["in_reply_to_screen_name"]=>
    string(8) "geneliad"
    ["favorited"]=>
    bool(false)
    ["in_reply_to_status_id"]=>
    float(16921181014)
    ["user"]=>
    object(stdClass)#13 (30) {
      ["statuses_count"]=>
      int(87)
      ["profile_sidebar_border_color"]=>
      string(6) "87bc44"
      ["description"]=>
      string(0) ""
      ["location"]=>
      string(16) "Hyderabad, India"
      ["profile_use_background_image"]=>
      bool(true)
      ["followers_count"]=>
      int(28)
      ["contributors_enabled"]=>
      bool(false)
      ["friends_count"]=>
      int(56)
      ["geo_enabled"]=>
      bool(true)
      ["profile_background_color"]=>
      string(6) "9ae4e8"
      ["lang"]=>
      string(2) "en"
      ["favourites_count"]=>
      int(0)
      ["created_at"]=>
      string(30) "Thu Nov 26 14:39:16 +0000 2009"
      ["verified"]=>
      bool(false)
      ["profile_text_color"]=>
      string(6) "000000"
      ["follow_request_sent"]=>
      bool(false)
      ["notifications"]=>
      bool(false)
      ["time_zone"]=>
      string(7) "Chennai"
      ["following"]=>
      bool(false)
      ["profile_link_color"]=>
      string(6) "0000ff"
This is the array I am getting... Now how to extract information from this?! Please guide me. Thanks
#40

[eluser]davidbehler[/eluser]
Code:
echo $array[0]->user->location;
//outputs Hyderabad, India

This doesn't look like the response I expected from user_timeline, but maybe you are calling something else.




Theme © iAndrew 2016 - Forum software by © MyBB