It seems like facebook comment box will display comments by
data-href="http://example.com/comments" value. So to display comments by category you have to provide category url there. To generate category url on ad.php file then use this function.
data-href="<?php echo Category::url($ad->Category);?>"
if you want to display comments by category and location then use following code:
data-href="<?php echo Category::url($ad->Category,$ad->Location);?>"