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