I am using the Simple LinkedIn PHP Library to create a searching feature for an application. The user can search through LinkedIn and retrieve matched users information. As of right now the feature is working properly, but how can I parse the XML returned by the API and get the user's ID to create a link to their profile?
This is a sample of the array returned by the API call:
{
"numResults": 17325,
"people": {
"_count": 10,
"_start": 0,
"_total": 110,
"values": [
{
"firstName": "Leon",
"headline": "Digital Marketing | Mobile Marketing | Video Marketing | SEO/SEM | Digital Media Sales Trainer",
"id": "EFMHqoTad3",
"lastName": "E. Spencer",
"pictureUrl": "http://m3.licdn.com/mpr/mprx/0_jOgiHrinvW_afCa6PRDyHPXZBdvfi3a6xyWyHPXke7T0p5JQl4SfQ1KEMXzr86fopjxjFqnEf1I-"
},
If I understand correctly, a users profile url looks like http://www.linkedin.com/profile/view?id=156996610
so I should just be able to extract the ID from the API call and append to the view?id=
query right? Can I do this with the SimpleXML PHP Library?