SocialProfile: changes for FanBoxes compatibility.

This code should be moved to the FanBoxes extension and ideally it'd be
using one of the hooks present in this file, but even that requires some
refactoring so I'll let it be here for the time being.

Refs Change-Id: Ida6c67be791eaff64b05d3352be8aeec00582b84 (FanBoxes
changes)

Change-Id: I9df9bcb4f4d259e84b43b04a924213eb07c09d08