Topic-icon Linkedin Connections

Active Subscriptions:

None
11 years 10 months ago #46238 by teamdin2
Is it possible to get the connections from Linkedin sing JFBConnect? I found this link developer.linkedin.com/documents/connections-api

But I'm not sure how to use it with JFBConnect. Thanks in advance for any help you can give.
The topic has been locked.
Support Specialist
11 years 10 months ago #46260 by alzander
Replied by alzander on topic Linkedin Connections
There isn't a built-in way to use it with JFBConnect to automatically save all of a user's connections, if that's what you're looking for.

JFBConnect does have some easy functions you could use to create your own functionality to fetch and process a user's connections, but you'd likely need a developer to implement the code. Basically, I could help you make the call to fetch the connections, but you'd have to determine what you want to do with all the data that comes back (store it in the database, etc).

I hope that helps explain, but if you have any questions, just let me know.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 9 months ago #46394 by teamdin2
Replied by teamdin2 on topic Linkedin Connections
Thank you so much for the reply Alex.
I am a Developer myself. I am trying to make an app that can interface between JFBConnect and an app that's being delivered using Java. I want to be able to use the authentication from JFBConnect in order to be able to use the LinkedIn and Facebook API's through the app. The app will be a web interface that is loaded inside of a joomla module using a Restful web service. What would you recommend I do? I can't seem to find any actual Documentation of all the classes available to JFBConnect or the API for it.
The topic has been locked.
Support Specialist
11 years 9 months ago #46403 by alzander
Replied by alzander on topic Linkedin Connections
We really don't have any low-level API documentation. It's rarely been asked for. Also, until the 6.0 release, the API was much more fluid than we would have liked anyways. It's pretty settled now, and we don't anticipate huge changes in the future because we now are able to add new social networks with (relative) ease as well as all the other features we want.

I can give a quick primer of what you're likely looking to do below:
In the JFBConnect -> Configuration -> LinkedIn area, add "r_network" to the Additional required permissions. That will let you access the user's 1st degree connection information.

Then, for code to fetch that:
$linkedInUserId = JFBCFactory::provider('linkedin')->getProviderUserId();
$fields = array('first-name', 'last-name');
$profile = JFBCFactory::provider('linkedin')->profile->fetchProfile($linkedInUserId . '/connections', $fields);
$connections = $profile->get('values');
foreach ($connections as $c)
   echo $c->firstName . " " . $c->lastName . "<br/>";
You can view the LinkedIn Connections API Documentation for all of the fields you can fetch about the connections.

Hopefully that will help you get started with fetching the LinkedIn info. Facebook friend information is much more limited as you can't fetch all of a user's friends. We can help clarify what you can get from Facebook if you need though.

Obviously, that's just connections, but it also points you through a couple of easy calls you can do.

The code above was tested, so it should just work (with a little luck). Of course, if you have any questions, just let me know!

Thanks,
Alex
The topic has been locked.
Support Specialist
11 years 9 months ago #46404 by alzander
Replied by alzander on topic Linkedin Connections
The main code for the above calls are all in the /components/com_jfbconnect/libraries directory. The /provider folder and provider.php file hold all of the native calls for managing the user (getting their ID, authenticating, etc). The /profile folder holds the individual profile classes for each social network. The function names are standardized, but the data you pass (or request) from each social network is different according to that networks demands.

Alex
The topic has been locked.