I have a small issue with getting number of followers from a company profile - which I am the admin of and I have set the "rw_company_admin" permission.
I am getting "Member 0 does not have permission to get company XXXXX".
If testing with the REST Console I get the number of followers and if I paste the URL with the access_token in a browser tab I get the number of followers, but with the JS SDK get the above mentioned error. I am using this code:
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: XXXXX
onLoad: onLinkedInLoad
authorize: true
</script>
<script type="text/javascript">
function onLinkedInLoad() {
IN.API.Raw("/companies/XXXXX:(num-followers)").result( function(result) {
$('#dashRightLinkedIn').html(addCommas(result.numFollowers));
}).error( function(error) {
console.log(error);
});
}
</script>
What do I miss?
I got it working - had to authorize app. I missed that part.