I would add the following.
label = "facebook".Replace('`', '\'').Replace(';', '_')
query = "MATCH p = (a:`"+label +"`)-->(b:"+label +") RETURN p"
What we are doing here is we added backticks so even if the label contains illegal characters, they wil...