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 131731 - [saas][facebook] FacebookSocialNetworkingServiceAuthenticator not usable in desktop apps
Summary: [saas][facebook] FacebookSocialNetworkingServiceAuthenticator not usable in d...
Status: CLOSED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: Manager (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Ayub Khan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-01 15:42 UTC by Lukas Jungmann
Modified: 2008-04-07 14:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2008-04-01 15:42:44 UTC
-have a java app which is set up also at facebook developers corner (or however it is called)
-d'n'd services tab -> web services -> Facebook -> SocialNetworkingService -> ... -> authCreateToken
-fill in required stuff in facebooksocialnetworkingserviceauthenticator.properties
-run the project
-authenticate your app in a browser and close the FaceBook Auth. Dialog

=>
...
run:
java.io.IOException: Failed to get a valid session secret.
        at
org.netbeans.saas.facebook.FacebookSocialNetworkingServiceAuthenticator.getSessionSecret(FacebookSocialNetworkingServiceAuthenticator.java:72)
        at
org.netbeans.saas.facebook.FacebookSocialNetworkingServiceAuthenticator.sign(FacebookSocialNetworkingServiceAuthenticator.java:170)
        at
org.netbeans.saas.facebook.FacebookSocialNetworkingService.authCreateToken(FacebookSocialNetworkingService.java:62)
        at javaapplication1.Main.main(Main.java:23)
BUILD SUCCESSFUL (total time: 22 seconds)

problem seems to be that generated FacebookSocialNetworkingServiceAuthenticator.java is looking for <secret> element
returned by facebook.auth.getSession but such element, as per
http://wiki.developers.facebook.com/index.php/Auth.getSession, is not guaranteed to be returned[1] - currently the
response from the server contains only "<secret/>" element (which is also bad, because FSNSA does not accept this as a
valid response).

[1]: see also http://api.facebook.com/1.0/facebook.xsd :
...
<xsd:complexType name="session_info">
  <xsd:sequence>
    <xsd:element name="session_key" type="session_key" />
    <xsd:element name="uid" type="uid" />
    <xsd:element name="expires" type="xsd:int" />
    <xsd:element name="secret" type="xsd:string" minOccurs="0" />
  </xsd:sequence>
</xsd:complexType>
...
Comment 1 Ayub Khan 2008-04-02 01:57:20 UTC
Should be fixed for 6.1, raising the priority to P1
Comment 2 Ayub Khan 2008-04-02 02:30:50 UTC
Fixed for 6.1 (in trunk), will merge to release61 after review

http://hg.netbeans.org/main/rev/cce3b436d1f1
Comment 3 Lukas Jungmann 2008-04-02 10:54:37 UTC
v. in trunk. Feel free to integrate it into release61, please.
Thanks.
Comment 4 Lukas Jungmann 2008-04-03 15:13:09 UTC
f. in release61: http://hg.netbeans.org/release61/rev/af9a42488793

v.