The man posted a picture of himself holding the baby out of a window in a high-rise building with the caption: “1,000 likes or I will drop him.”
The man, who is a relative of the child, denied he put his life at risk, saying the image had been altered by social media users, Algeria’s privately owned Ennahar TV reported.
“The picture was taken in a balcony with protective barriers. These were removed,” he was quoted as saying.
The child’s father pleaded with the court to forgive the man, saying he had just been playing a game.
It prompted other social media users to demand his arrest for child abuse. He was charged with endangering the baby’s safety following his arrest on Sunday, police said.