This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 143471 - [saas][facebook][java] Failed to get session key and secret
Summary: [saas][facebook][java] Failed to get session key and secret
Status: RESOLVED WONTFIX
Alias: None
Product: webservices
Classification: Unclassified
Component: Manager (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Ayub Khan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-11 14:11 UTC by Lukas Jungmann
Modified: 2008-08-11 19:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
"fixed" authenticator for Facebook (6.25 KB, text/plain)
2008-08-11 14:12 UTC, Lukas Jungmann
Details
Web app containing facebook friends.get dnd generated code (186.88 KB, application/x-compressed)
2008-08-11 18:59 UTC, Ayub Khan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2008-08-11 14:11:25 UTC
-dnd facebook -> getFriends into some java app's main class
-filling proper credentials
-run app

=>
java.io.IOException: Failed to get session key and secret: <?xml version="1.0" encoding="UTF-8"?>
<auth_getSession_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd">
  <session_key>...</session_key>
  <uid>...</uid>
  <expires>...</expires>
  <secret/>
</auth_getSession_response>

workaround seems to be to use attached fixed(?) authenticator instead of generated one
Comment 1 Lukas Jungmann 2008-08-11 14:12:17 UTC
Created attachment 67006 [details]
"fixed" authenticator for Facebook
Comment 2 Ayub Khan 2008-08-11 18:58:16 UTC
This works asis fine for me. There is no need to call createToken rest method, facebook adds that to the callback url.
Please try the attached app WebApplciation4.zip generated after dnd.
Comment 3 Ayub Khan 2008-08-11 18:59:26 UTC
Created attachment 67067 [details]
Web app containing facebook friends.get dnd generated code
Comment 4 Lukas Jungmann 2008-08-11 19:07:13 UTC
well, but I'm talking about Java SE environment, ie. some java desktop application, not about a web application in this case
Comment 5 Lukas Jungmann 2008-08-11 19:11:24 UTC
problem is that login method in Java SE authenticator contains:

...
sessionSecret = result.substring(result.indexOf("<secret>") + 8,
   result.indexOf("</secret>"));
...

but as can be seen from the facebook response this has to fail because facebook returns only "<secret/>" and not
"<secret>somesessionsecret</secret>"
Comment 6 Lukas Jungmann 2008-08-11 19:28:18 UTC
strange, now I get a different response from fbc (now with full <secret>...</secret>) then ~5hours ago :-( Perhaps
something temporary...