Topic-icon importing user profile information

Active Subscriptions:

None
12 years 10 months ago #34904 by andbal2
Hi, i use community builder plugin to import user profile information from facebook to my db.
for each user is it possibile import also friend list and facebook page user clicked "i like"?
The topic has been locked.
Support Specialist
12 years 10 months ago #34925 by alzander
Andrea,
Our profile plugins don't have an option to fetch the user's friend list, but it is possible to get that user's friend using some Facebook API calls through JFBConnect. We can gladly give you the code you would need to fetch a friend list (Facebook IDs, name, profile link, and picture) from Facebook. That would require a developer on your end to do something with that data (store in the database, etc). If you'd like more information, just let me know.

I'm not sure what you meant by "and facebook page user clicked "i like"?" Can you explain that more as to what you're looking for?

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

None
12 years 10 months ago #34973 by andbal2
hi, tx for your fast reply, would be freat if you give me code to fetch friend list. for second point i mean list of facebook page user clicked "i like". i think in this way we can know user interest better then simple interest or activities fields. would be great also know facebook groups to which he is registered. is it possibile? tx, best regards
The topic has been locked.
Support Specialist
12 years 10 months ago #34981 by alzander
To get a user's friends, you can use the following code:
$jfbcLibrary = JFBConnectFacebookLibrary::getInstance();
$friends = $jfbcLibrary->api('/me/friends?fields=id,name,link,picture');
$friends = $friends['data'];
From there, you'll have an array of friend data with their id, name, link, and picture.

For Likes, you'll need to make sure you're requesting the user_likes permission. That can be added in the Configuration -> Facebook API area of JFBConnect. Then, you can do something similar to the above:
$jfbcLibrary = JFBConnectFacebookLibrary::getInstance();
$likes = $jfbcLibrary->api('/me/likes');
I haven't tested Likes before, but I'm pretty sure that's all there is to it. For more information on fetching Like's, please see:
developers.facebook.com/docs/reference/api/user/#likes

I hope that helps, but if you need anything else, run into issues, or have have any questions, just let me know.

Thanks,
Alex
The topic has been locked.