Social Login - Gathering LinkedIn Data

edited August 2017 in phpBB
Hi,
Do you have a guide on gathering extracted data from LinkedIn Basic Profiles and inserting it into phpBB profiles?
Avatar photo and Name gets pulled in by default but I'd like to add other fields such as LinkedIn URL.
Thanks

Best Answer

  • Claude_SchlesserClaude_SchlesserAdministratorOneAll Team
    Answer ✓
    Hi Carl,

    that's really great! Thank you for the instructions!

    Best Regards,

Answers

  • edited August 2017
    Solved it. Create some new custom fields in ACP, e.g. phpbb_li_note, phpbb_linkedin, then edit the extension's listener.php to collect the data fields you require and drop them into the custom fields (with pf_ in front of them), e.g. below (section from listener.php

    $event['cp_data'] = array ( // For example: a custom field named 'phpbb_linkedin': 'pf_phpbb_linkedin' => $social['user_website'], // Risk of E_NOTICE and NULL. 'pf_phpbb_li_note' => $social['user_note'], // Risk of E_NOTICE and NULL. 'pf_phpbb_location' => $social['user_location'], // Risk of E_NOTICE and NULL. );

    To see all the data the extension is pulling in from LinkedIn, change the logging setting at the bottom of listener.php to
    $phpbb_log->add ('admin', $user->data['user_id'], $user->ip, 'LOG_PROFILE_FIELD_EDIT', time(), $social);
    and it'll show everything you can potentially reference for data gathering. (Log shows in the phpBB database.)
Sign In or Register to comment.