function showProfileInfo(Ostatus_profile $oprofile)
{
    if ($oprofile->isGroup()) {
        echo "group\n";
    } else {
        $profile = $oprofile->localProfile();
        try {
            foreach (array('nickname', 'fullname', 'bio', 'homepage', 'location') as $field) {
                print "  {$field}: {$profile->{$field}}\n";
            }
        } catch (NoProfileException $e) {
            print "local profile not found";
        }
    }
    echo "\n";
}