Ejemplo n.º 1
0
        </div>
    </div>
    <div class="contentfull">
        <div class="spacerblock_80"></div>
        <div class="spacerblock_80">
            <div id="waitimage" class="center_text">
                <img class="center_elem" src="/images/wait30.gif" width="30" height="30" alt="" />
            </div>
        </div>
<?php 
    $token = unserialize($serialized_token);
    $tw_user_id = $token->getParam('user_id');
    $tw_screen_name = $token->getParam('screen_name');
    $tw_config = $do_twitter->getTwitterConfig();
    $ofuz_twitter = new Ofuz_Service_Twitter($tw_user_id, $tw_config, $token);
    $friends = $ofuz_twitter->userFriends(array('id' => $tw_user_id));
    if (count($friends->user) > 0) {
        foreach ($friends->user as $user) {
            $user_id = $user->id;
            $name = $user->name;
            // will contain the first and last name
            $screen_name = $user->screen_name;
            $description = $user->description;
            $profile_image_url = $user->profile_image_url;
            $url = $user->url;
            $friend_data = array('user_id' => $user_id, 'name' => $name, 'screen_name' => $screen_name, 'description' => $description, 'profile_image_url' => $profile_image_url, 'url' => $url);
            $do_twitter->importTwitterFriend($friend_data);
        }
        //rebuilding the userXX_contact table
        $contact_view = new ContactView();
        $contact_view->setUser($_SESSION['do_User']->iduser);