My favorites | Sign in
Project Home Downloads Source
Repository:
Checkout   Browse   Changes   Clones    
 
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
50
/*
* LinkedInAPI.fx
*
* Created on Apr 14, 2010, 11:10:37 AM
*/

package javafxoauth.api;

import javafx.io.http.HttpHeader;
import javafx.io.http.HttpRequest;


/**
* http://developer.linkedin.com/docs/DOC-1008
*
* @author Rakesh Menon
*/

public class LinkedInAPI extends OAuthAPI {

init {

requestTokenURL = "https://api.linkedin.com/uas/oauth/requestToken";
authorizeURL = "https://api.linkedin.com/uas/oauth/authorize";
accessTokenURL = "https://api.linkedin.com/uas/oauth/accessToken";

requestTokenMethod = HttpRequest.POST;
accessTokenMethod = HttpRequest.POST;

realm = "http://api.linkedin.com";
}

public function getBasicMemberProfile(
callback : function(response:String):Void) : Void {

def url = "https://api.linkedin.com/v1/people/~";
def method = HttpRequest.GET;

def authHttpHeader = createOAuthHeader(url, method);

def headers = [
authHttpHeader,
HttpHeader {
name: HttpHeader.CONTENT_TYPE value: "text/xml"
}
];

submitHttpRequest(url, method, headers, null, callback);
}
}

Change log

26d3503d8454 by Rakesh Menon on Apr 14, 2010   Diff
JavaFXOAuth
Go to: 

Older revisions

All revisions of this file

File info

Size: 1181 bytes, 50 lines
Powered by Google Project Hosting