Jump to content

Followed,Followers and Mutuals in twitter.


xymalf

Recommended Posts


$twitterObj->setToken($_GET['oauth_token']);
$token = $twitterObj->getAccessToken();
$twitterObj->setToken($token->oauth_token, $token->oauth_token_secret);
$twitterInfo= $twitterObj->get_accountVerify_credentials();
$twitterInfo->response;
echo "Your twitter username is {$twitterInfo->screen_name} and your profile picture is <img src=\"{$twitterInfo->profile_image_url}\">";
#### new code ####

 

I have wrote the above simple php program to display my twitter name and photo.

 

How do I add to the code so it will display Followed, Followers, Mutuals and their picures?

 

I don't know how to use the screen_name variable for this.

 

 

Link to comment
Share on other sites

Token stuff then......

 

[responseText] => {"id":23638744,"url":"http:\/\/xeeme.com\/adrianbonnington","statuses_count":7433,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/419516975\/twilk_background_4f3242d762664.jpg","profile_use_background_image":true,"default_profile":false,"verified":false,"profile_text_color":"333333","contributors_enabled":false,"created_at":"Tue Mar 10 19:33:29 +0000 2009","friends_count":1995,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/947242370\/3d93255b-8bd4-4bb8-b3d7-a3a01491146b_normal.png","utc_offset":0,"profile_sidebar_border_color":"86A4A6","show_all_inline_media":false,"name":"adrian bonnington","listed_count":16,"location":"UK","id_str":"23638744","profile_background_tile":true,"protected":false,"profile_sidebar_fill_color":"A0C5C7","is_translator":false,"geo_enabled":false,"follow_request_sent":false,"lang":"en","description":"unemployed electronics engineer","default_profile_image":false,"profile_background_color":"709397","screen_name":"xymalf","favourites_count":2,"time_zone":"London","notifications":false,"profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/419516975\/twilk_background_4f3242d762664.jpg","profile_link_color":"FF3300","status":{"id_str":"238667648026697728","contributors":null,"truncated":false,"created_at":"Thu Aug 23 16:02:56 +0000 2012","in_reply_to_user_id":null,"in_reply_to_status_id_str":null,"in_reply_to_screen_name":null,"retweeted":false,"possibly_sensitive":false,"in_reply_to_user_id_str":null,"coordinates":null,"in_reply_to_status_id":null,"geo":null,"source":"\u003Ca href=\"http:\/\/twitter.com\/tweetbutton\" rel=\"nofollow\"\u003ETweet Button\u003C\/a\u003E","possibly_sensitive_editable":true,"id":238667648026697728,"place":null,"retweet_count":0,"favorited":false,"text":"This is Not a Photograph: Amazing Portrait Drawn with Ballpoint Pens by Samuel Silva http:\/\/t.co\/4PkZ3rOE via @colossal"},"following":false,"profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/947242370\/3d93255b-8bd4-4bb8-b3d7-a3a01491146b_normal.png","followers_count":719}

    [response] => Array

        (

            [id] => 23638744

            => http://xeeme.com/adrianbonnington

            [statuses_count] => 7433

            [profile_background_image_url_https] => https://si0.twimg.com/profile_background_images/419516975/twilk_background_4f3242d762664.jpg

            [profile_use_background_image] => 1

            [default_profile] =>

            [verified] =>

            [profile_text_color] => 333333

            [contributors_enabled] =>

            [created_at] => Tue Mar 10 19:33:29 +0000 2009

            [friends_count] => 1995

            [profile_image_url] => http://a0.twimg.com/profile_images/947242370/3d93255b-8bd4-4bb8-b3d7-a3a01491146b_normal.png

            [utc_offset] => 0

            [profile_sidebar_border_color] => 86A4A6

            [show_all_inline_media] =>

            [name] => adrian bonnington

            [listed_count] => 16

            [location] => UK

            [id_str] => 23638744

            [profile_background_tile] => 1

            [protected] =>

            [profile_sidebar_fill_color] => A0C5C7

            [is_translator] =>

            [geo_enabled] =>

            [follow_request_sent] =>

            [lang] => en

            [description] => unemployed electronics engineer

            [default_profile_image] =>

            [profile_background_color] => 709397

            [screen_name] => xymalf

            [favourites_count] => 2

            [time_zone] => London

            [notifications] =>

            [profile_background_image_url] => http://a0.twimg.com/profile_background_images/419516975/twilk_background_4f3242d762664.jpg

            [profile_link_color] => FF3300

            [status] => Array

                (

                    [id_str] => 238667648026697728

                    [contributors] =>

                    [truncated] =>

                    [created_at] => Thu Aug 23 16:02:56 +0000 2012

                    [in_reply_to_user_id] =>

                    [in_reply_to_status_id_str] =>

                    [in_reply_to_screen_name] =>

                    [retweeted] =>

                    [possibly_sensitive] =>

                    [in_reply_to_user_id_str] =>

                    [coordinates] =>

                    [in_reply_to_status_id] =>

                    [geo] =>

                    [source] => Tweet Button

                    [possibly_sensitive_editable] => 1

                    [id] => 238667648026697728

                    [place] =>

                    [retweet_count] => 0

                    [favorited] =>

                    [text] => This is Not a Photograph: Amazing Portrait Drawn with Ballpoint Pens by Samuel Silva http://t.co/4PkZ3rOE via @colossal

                )

 

            [following] =>

            [profile_image_url_https] => https://si0.twimg.com/profile_images/947242370/3d93255b-8bd4-4bb8-b3d7-a3a01491146b_normal.png

            [followers_count] => 719

        )

 

    [id] => 23638744

    => http://xeeme.com/adrianbonnington

    [statuses_count] => 7433

    [profile_background_image_url_https] => https://si0.twimg.com/profile_background_images/419516975/twilk_background_4f3242d762664.jpg

    [profile_use_background_image] => 1

    [default_profile] =>

    [verified] =>

    [profile_text_color] => 333333

    [contributors_enabled] =>

    [created_at] => Tue Mar 10 19:33:29 +0000 2009

    [friends_count] => 1995

    [profile_image_url] => http://a0.twimg.com/profile_images/947242370/3d93255b-8bd4-4bb8-b3d7-a3a01491146b_normal.png

    [utc_offset] => 0

    [profile_sidebar_border_color] => 86A4A6

    [show_all_inline_media] =>

    [name] => adrian bonnington

    [listed_count] => 16

    [location] => UK

    [id_str] => 23638744

    [profile_background_tile] => 1

    [protected] =>

    [profile_sidebar_fill_color] => A0C5C7

    [is_translator] =>

    [geo_enabled] =>

    [follow_request_sent] =>

    [lang] => en

    [description] => unemployed electronics engineer

    [default_profile_image] =>

    [profile_background_color] => 709397

    [screen_name] => xymalf

    [favourites_count] => 2

    [time_zone] => London

    [notifications] =>

    [profile_background_image_url] => http://a0.twimg.com/profile_background_images/419516975/twilk_background_4f3242d762664.jpg

    [profile_link_color] => FF3300

    [status] => Array

        (

            [id_str] => 238667648026697728

            [contributors] =>

            [truncated] =>

            [created_at] => Thu Aug 23 16:02:56 +0000 2012

            [in_reply_to_user_id] =>

            [in_reply_to_status_id_str] =>

            [in_reply_to_screen_name] =>

            [retweeted] =>

            [possibly_sensitive] =>

            [in_reply_to_user_id_str] =>

            [coordinates] =>

            [in_reply_to_status_id] =>

            [geo] =>

            [source] => Tweet Button

            [possibly_sensitive_editable] => 1

            [id] => 238667648026697728

            [place] =>

            [retweet_count] => 0

            [favorited] =>

            [text] => This is Not a Photograph: Amazing Portrait Drawn with Ballpoint Pens by Samuel Silva http://t.co/4PkZ3rOE via @colossal

        )

 

    [following] =>

    [profile_image_url_https] => https://si0.twimg.com/profile_images/947242370/3d93255b-8bd4-4bb8-b3d7-a3a01491146b_normal.png

    [followers_count] => 719

)

 

I don't see how i can use this info?

Link to comment
Share on other sites

Well followers_count is one of the things you want. following should be the other. Mutuals is a lot harder to figure out.

 

Unless you meant you don't want just the count but all the names?

 

Is this a third party script that connects to Twitter to get the info? If so, you'll need to check with their docs and/or ask in third party apps.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.