-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
executable file
·49 lines (39 loc) · 1.12 KB
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Linkedin Test</title>
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: 81t2pllbr8lep1
onLoad: OnLinkedInFrameworkLoad
authorize: false
</script>
</head>
<body>
<script type="in/Login">
</script>
<script type="text/javascript">
function OnLinkedInFrameworkLoad() {
IN.Event.on(IN, "auth", OnLinkedInAuth);
}
function OnLinkedInAuth() {
IN.API.Profile("me").result(ShowProfileData);
}
function ShowProfileData(profiles) {
var member = profiles.values[0];
var id=member.id;
var firstName=member.firstName;
var lastName=member.lastName;
var photo=member.pictureUrl;
var headline=member.headline;
for (var key in profiles.values[0]) {
if (profiles.values[0].hasOwnProperty(key)) {
console.log(key+"\n");
}
}
//use information captured above
console.log(id+" "+firstName+" "+lastName+" "+photo+" "+headline);
}
</script>
</body>
</html>