You want to access the shares property of the object held in the [noparse]http://www.domain.com[/noparse] property of the $fb object. In multiple stages that would look like:
$object = $db->{$url};
$count = $object->shares;
And in one line it would be:
$count = $fb->{$url}->shares;
If that is too confusing or unclear, another option is to return a nested array from json_decode() like: