I'm going to wait for more information before believing this. There have been so many cases of fake twitter outrage that it makes sense to wait a day or two before taking out the pitchforks.
What's sad is that in this climate it's not completely unbelievable that something like this could happen.
I'm not sure it would be cause for pitchforks if true. Immigration officers in general tend to act aggressive and ask weird questions as some sort of attempt at behavioral screening. Canada only cares that tourists have enough money to leave and don't plan to work, but the last time I went, I got asked why there was mud on my car. Seriously.
This authors of this article claim that his employers were contacted to verify his identity. It doesn't necessarily prove that he was asked technical questions, but it was enough for me to believe the tweet http://www.recode.net/2017/2/28/14764064/nigerian-software-e...