But he didn't have a strong heart, he fell to the darkness.
Yes he did. He states, "I'm not afraid of the darkness!" He's looking darkness in the face and he's ready to jump right in, because he's not afraid. That's strength of heart. If his heart was weak, he probably would have tried to run away from something so scary as darkness.
I think that, despite the Keyblade not being
affected by darkness, it still went to Sora because his Heart still resisted the darkness after Riku allowed it (the darkness) to swallow him. I don't know if that means that Riku's Heart was weakened when he was taken by the darkness, or if the Keyblade couldn't go to someone who was just swallowed by the darkness.
But... yeah. Riku was the "wielder", Sora's Heart was strong enough to receive the Keyblade when Riku disappeared, and Riku accepted his darkness and got the Keyblade as he rightfully was supposed to. He then lost it when Sora's heart's strength triumphed, when Riku was abandoned due to Donald's and Goofy's friendship. Riku's heart was lost inside of Xehanort's, and it wasn't until Riku tempered his own darkness and gained strength of heart that way that he re-gained usage of a Keyblade.
Riku didn't get Terra's Keyblade because Terra wasn't giving Riku his Keyblade, he was naming Riku his successor in Keyblade Wielding. Aqua, Terra, and Ven don't use Eraqus's Keyblade because they are his successors (well, Aqua does, but not because she's his successor--it's because her own Keyblade was abandoned when she saved Terra). Kairi used a Keyblade that Aqua owned, but it took the form of Destiny's Embrace because that Keyblade represents Kairi's ties to Aqua. I think it's safer to assume that Riku intentionally transferred a Keyblade to Kairi, and when he began transfer, it took the shape of Aqua's Keyblade, which relates to Aqua's blessing on Kairi.
It seems I have digressed. tl;dr, Riku's a true wielder because Terra made it so, and even though his Heart went on a roller coaster of weakness and strength, Riku was able to receive a Keyblade of his own. He doesn't get Terra's because... well, it's Terra's (and because Terra's Lingering Sentiment is still holding it when Riku finally receives the Keyblade).