Created
May 13, 2011 17:10
-
-
Save jsjohnst/970913 to your computer and use it in GitHub Desktop.
Example of getting recommendations from LinkedIn JSAPI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head><title>Your Recommendations</title></head> | |
<body> | |
<script type="text/javascript" src="http://platform.linkedin.com/in.js"> | |
api_key: <your API key> | |
authorize: true | |
</script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> | |
<script type="IN/Login" data-onAuth="authSuccess"></script> | |
<script> | |
function authSuccess() { | |
var recos_element = $("#recos"); | |
IN.API.Raw("/people/~/recommendations-received").result(function(result) { | |
for(var key in result.values) { | |
var reco = result.values[key]; | |
recos_element.append($('<p><i><b>' + reco.recommender.firstName + ' ' + reco.recommender.lastName + '</b> says,</i><br> ' + reco.recommendationText + '</p>')); | |
} | |
}); | |
} | |
</script> | |
<h1>Your Recommendations</h1> | |
<ul id="recos"></ul> | |
</body> | |
</html> |
{
"errorCode": 0,
"message": "Access to recommendations-received denied",
"requestId": "xxxxxxxxxxxxxx",
"status": 403,
"timestamp": xxxxxxxxxxxx
}
I am not able to access the recommendation. Anyone faced this ? any solution
@agnihotriketan, it looks like you need to be a member partner to do this now, or did you have any luck?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Jeremy,
I have tried this API code but not worked for me,I just want to extract all our website user's linkedin recommendation like you have shown in example & show it to their profile.
Please help me out..
Thanks!!!!!