It's not illegal but it is actionable. You don't go to jail for that but you can be sued into the poorhouse.
> He was chief technology officer of Facebook, and also served as its vice president of engineering, until 2008.
> D'Angelo was an advisor to and investor in Instagram before its acquisition by Facebook in 2012.
Where is the precedent for this?