0
我正在開發Facebook應用程序。在此應用程序中,我使用Google提供的Java API,並且該應用程序基於Web。使用Facebook-Java API獲取sessionKey
我有facebook_api_key
和facebook_secrete
,但如何獲得sessionKey
?
此代碼不是基於Web的:
FacebookJsonRestClient client = new FacebookJsonRestClient(Test.API_KEY, Test.SECRET);
String token = client.auth_createToken();
String url = "http://www.facebook.com/login.php?api_key=";
url += Test.API_KEY;
url += "&v=1.0";
url += "&auth_token=";
url += token;
String strCommand = "C:/Program Files/Internet Explorer/IEXPLORE.EXE ";
strCommand += url;
Runtime.getRuntime().exec(strCommand);
// wait until the login process is completed
// fetch session key
String session = client.auth_getSession(token, true);
......
我想將其更改爲一個基於Web的一個。
它只是基於桌面的應用程序。我不能使用你在Servlet中說的話!!!!! – 2010-07-08 06:15:34