Skip to Content Skip to Menu

Getting data from LinkedIn through CB connect in a specific language

10 years 3 months ago #247545 by DutchAlfred
I have CB connect working, importing data from LinkedIn. LinkedIn has a number of fields with standardised drop down lists: Location, Industry, Company size etc. When I import these data I get them in English. However, I want to get them in Dutch. According to LinkedIn this is possible (see: developer.linkedin.com/documents/profile-api ):

"To specify the language you prefer, pass an Accept-Language HTTP header. Set the values to a comma separated list of locales ordered from highest to lowest preference. For example, if your preferred order is Spanish, then English (American), and finally Italian, your header should be: Accept-Language: es-ES, en-US, it-IT."

I understand that this is currently not a functionality, but I need a workaround for the moment. What would be the syntax and the right place to put such a line?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8282
  • Karma: 1443
10 years 3 months ago #247566 by krileon
You'll need to modify the below file.

components/com_comprofiler/plugin/user/plug_cbconnect/cbconnect.class.php

The class cbconnectLinkedIn is responsible for the LinkedIn integration. In the getConnectUser function of that class is the CURL call to grab the users profile data. It uses the httpRequest CB Connect function to do this, which supports an array header to send an array of header data with the CURL request.

Please note we do not support core edits so beyond the above I can't suggest anything further, sorry.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum