Instagram hopes to lure more college students to the platform with a feature that makes it easy to connect with classmates.

The company, which is owned by Facebook, confirmed on Friday that it is testing a tool that allows students to join a virtual community of peers and exchange direct messages with them.

People must opt-in to the test, and they are free to accept or ignore messages from anyone they don't follow, or even block them entirely.

Instagram's announcement comes four days after dating app Tinder rolled out Tinder U, an iOS-only feature that allows users to limit their search to classmates or nearby campuses.

Tinder said it designed the tool for more than romance; students can use to make friends or find a study buddy, too.

Related: Instagram Stories is twice as popular as Snapchat

Both Tinder and Facebook (FB) started on college campuses, so it's not surprising to see them tapping their roots and trying to attract the coveted Gen Z demographic.

"Today, more than half of our users are between the ages of 18 and 24," Brian Norgard, chief product officer at Tinder, said in a statement. "With Tinder U, we're excited to honor our roots with a new experience that helps students meets other students nearby."

Instagram in particular has made an effort to attract younger users. It regularly cribs from Snapchat's most popular features, adding facial filters and Stories, its name for photos and videos that disappear after 24 hours.

The app has provided some good news for Facebook as it faces scrutiny from lawmakers and backlash from users concerned about privacy and the Cambridge Analytica debacle.

Instagram's continued popularity has helped offset slowing growth for Facebook, which saw stagnating, or even receding, numbers of daily users in the US and other developed markets, according to its most recent earnings report.