<?php if (!defined('VB_ENTRY')) die('Access denied.'); class vB_Api_Vb4_facebook extends vB_Api { public function getVbfromfacebook($facebookidList) { $cleaner = vB::getCleaner(); $facebookidList = $cleaner->clean($facebookidList, vB_Cleaner::TYPE_STR); $usersArray = []; $listIds = explode(',', $facebookidList); $users = vB::getDbAssertor()->getRows('user', ['fbuserid' => $listIds]); if (!empty($users) || !isset($users['errors'])) { foreach ($users as $user) { $usersArray[] = [ 'userid' => $user['userid'], 'username' => $user['username'], 'displayname' => $user['displayname'], 'fbuserid' => $user['fbuserid'], ]; } } return ['response' => [ 'users' => $usersArray ]]; } } 