hi,

right now im using id to for status update,
how to use id_str,
how can i get id_str?

im using twitter api on my php page..

ex follower response is

20/December/2010 13:22:51: SimpleXMLElement Object
(
    [...@attributes] => Array
        (
            [type] => array
        )

    [user] => Array
        (
            [0] => SimpleXMLElement Object
                (
                    [id] => 17949969
                    [name] => MattsLens
                    [screen_name] => MattsLens
                    [location] => Grand Rapids, Michigan
                    [description] => MattsLens.com utilizes
photography & Social Media to help individuals and businesses develop
and improve their online presence.
                    [profile_image_url] =>
http://a3.twimg.com/profile_images/1118820404/MattsLens_Logo_2010_normal.jpg
                    [url] => http://wefollow.com/MattsLens
                    [protected] => false
                    [followers_count] => 453
                    [profile_background_color] => 0f0f0f
                    [profile_text_color] => 666666
                    [profile_link_color] => 1A6DC5
                    [profile_sidebar_fill_color] => 212020
                    [profile_sidebar_border_color] => 404040
                    [friends_count] => 620
                    [created_at] => Sun Dec 07 23:08:22 +0000 2008
                    [favourites_count] => 3
                    [utc_offset] => -18000
                    [time_zone] => Eastern Time (US & Canada)
                    [profile_background_image_url] =>
http://a0.twimg.com/profile_background_images/158496637/xac4b1478dba4c3be11d522b5b3ed6a7.jpg
                    [profile_background_tile] => false
                    [profile_use_background_image] => false
                    [notifications] => false
                    [geo_enabled] => false
                    [verified] => false
                    [following] => true
                    [statuses_count] => 2683
                    [lang] => en
                    [contributors_enabled] => false
                    [follow_request_sent] => false
                    [listed_count] => 71
                    [show_all_inline_media] => false
                    [is_translator] => false
                    [status] => SimpleXMLElement Object
                        (
                            [created_at] => Mon Dec 20 05:31:44 +0000
2010
                            [id] => 16727427753443328
                            [text] => Just added myself to the
http://wefollow.com twitter directory!
                            [source] => <a href="http://wefollow.com";
rel="nofollow">WeFollow</a>
                            [truncated] => false
                            [favorited] => false
                            [in_reply_to_status_id] =>
SimpleXMLElement Object
                                (
                                )

                            [in_reply_to_user_id] => SimpleXMLElement
Object
                                (
                                )

                            [in_reply_to_screen_name] =>
SimpleXMLElement Object
                                (
                                )

                            [retweet_count] => 0
                            [retweeted] => false
                            [geo] => SimpleXMLElement Object
                                (
                                )

                            [coordinates] => SimpleXMLElement Object
                                (
                                )

                            [place] => SimpleXMLElement Object
                                (
                                )

                            [contributors] => SimpleXMLElement Object
                                (
                                )

                        )

                )
)

for get connection i used the below code

* Assues there is already a valid token available for this user
        */
        public function getConnections($token)
        {
                global $logger;
                $twitter_con_arr = array();
                if ($token == null)
                        return $twitter_con_arr;

                // Use HTTP Client with built-in OAuth request handling
                $client = $token->getHttpClient($this->option_array);

                // to get Twitter connections
                
$client->setUri('http://api.twitter.com/1/statuses/followers.xml');

                // Set Method (GET, POST or PUT)
                $client->setMethod(Zend_Http_Client::GET);

                // Get Request Response
                $response = $client->request();

                // Get the XML containing User's Profile
                $content =  $response->getBody();

                $xmlobj = simplexml_load_string($content);
                $scxpath = array(
                                                
"tw:source_id"=>"/users/user/id",
                                                
"tw:screen_name"=>"/users/user/screen_name"
                                                );

                for($i=1;$i<=count($xmlobj->user);$i++)
                {
                        foreach($scxpath as $k=>$v)
                        {
                                $twitter_con_arr[$k.":".$i] = 
$this->getValue($v,$i-1,$xmlobj);
                        }
                        $twitter_con_arr['tw:name:'.$i] =
$twitter_con_arr['tw:screen_name:'.$i];
                        $twitter_con_arr['tw:original_source_id:'.$i] =
$twitter_con_arr['tw:source_id:'.$i];
                }
                return $twitter_con_arr;
        }


please tell me how to use id_str, how can i get id_str

-- 
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

Reply via email to