/** * Create a new user mapping between a Wikia user account and a FB account * * @param int $wikiaUserId * @param int $fbUserId * @param string $bizToken * * @return FacebookMapModel|null Returns the mapping on success, null otherwise */ public static function createUserMapping($wikiaUserId, $fbUserId, $bizToken = '') { $map = new self(); $map->setBizToken($bizToken); $map->relate($wikiaUserId, $fbUserId); try { $map->save(); } catch (\FacebookMapModelException $e) { return null; } return $map; }