Facebook banned a quiz app from its platform for refusing an inspection and concerns that data on as many as 4 million users was misused.

The social media company said Wednesday that it took action against the myPersonality app after it found user information was shared with researchers and companies "with only limited protections in place."

Facebook said it would notify the app's users that their data was misused. It's only the second time Facebook has banned an app, after it blocked one linked to political data mining firm Cambridge Analytica that sparked a privacy scandal.

Get Breaking News Delivered to Your Inbox

The company said myPersonality was "mainly active" prior to 2012, and it wasn't clear why Facebook was taking action now.

The app was created in 2007 by researcher David Stillwell and allowed users to take a personality questionnaire and get feedback on the results.

The Cambridge Analytica scandal sparked a wider investigation in March by Facebook, which said it had investigated thousands of apps and suspended more than 400 apps over data sharing concerns.

Cambridge Analytica obtained data on up to 87 million users. It was collected by an app, "This Is Your Digital Life," created by researcher Aleksandr Kogan, which Facebook banned after it found out.