@classmethod
def _convert_facebook_data(cls, facebook_profile_data, username=True):
    """
        Takes facebook user data and converts it to a format for
        usage with Django
        """
    user_data = facebook_profile_data.copy()
    profile = facebook_profile_data.copy()
    website = profile.get('website')
    if website:
        user_data['website_url'] = cls._extract_url(website)
    user_data['facebook_profile_url'] = profile.get('link')
    user_data['facebook_name'] = profile.get('name')
    if len(user_data.get('email', '')) > 75:
        del user_data['email']
    gender = profile.get('gender', None)
    if gender == 'male':
        user_data['gender'] = 'm'
    elif gender == 'female':
        user_data['gender'] = 'f'
    user_data['username'] = cls._retrieve_facebook_username(user_data)
    user_data['password2'], user_data['password1'] = (cls.
        _generate_fake_password(),) * 2
    facebook_map = dict(birthday='date_of_birth', about='about_me', id=
        'facebook_id')
    for k, v in facebook_map.items():
        user_data[v] = user_data.get(k)
    user_data['facebook_id'] = int(user_data['facebook_id'])
    if not user_data['about_me'] and user_data.get('quotes'):
        user_data['about_me'] = user_data.get('quotes')
    user_data['date_of_birth'] = cls._parse_data_of_birth(user_data[
        'date_of_birth'])
    if username:
        user_data['username'] = cls._create_unique_username(user_data[
            'username'])
    if 'first_name' in user_data:
        user_data['first_name'] = user_data['first_name'][:30]
    if 'last_name' in user_data:
        user_data['last_name'] = user_data['last_name'][:30]
    return user_data
