The social media giant must do more to protect user data, says former GCHQ boss Robert Hannigan.