Three youths have been arrested in this connection, they said.
One of the accused, identified as Obaibuddin, had allegedly posted some abusive comments on Facebook against his friend Irfan, police said.
Irfan and his brother Muqeeth came to G M colony here to resolve the matter on the night of February 24, sub-inspector K Laxmaiah said, adding, Obaiduddin and his friends Abdul Sheikh B and Khalid B had heated arguments with them.
Following a complaint by Irfan, Chandrayangutta police arrested Obaiduddin and his two friends last night and registered a case against them under section 307 (attempt to murder), he said.
Irfan was taken to a hospital where his condition was stated to be stable, police added.