Is drinking in public allowed in Barcelona?

No. Drinking in public is illegal in Barcelona? However you generally won't be fined by police but bear in mind that you could be. Beware of the many street vendors of beers and the vendors of drinks on the beach because they use sewers and garbage containers to store their goods, so you might pick up a nasty infection.