Closed GoogleCodeExporter closed 8 years ago
Also, there are several API calls that will fail because the
FacebookWebappHelper
only initializes the FacebookRestClient with the user from fb_user and not from
fb_canvas_user. I have fixed this with the following patch:
Index:
facebook-java-api/src/main/java/com/google/code/facebookapi/FacebookWebappHelper
.java
===================================================================
---
facebook-java-api/src/main/java/com/google/code/facebookapi/FacebookWebappHelper
.java (revision
325)
+++
facebook-java-api/src/main/java/com/google/code/facebookapi/FacebookWebappHelper
.java (working
copy)
@@ -74,10 +74,13 @@
{
// caching of session key / logged in user
String userS = fbParams.get( FacebookParam.USER.getSignatureName() );
+ String canvasUser = fbParams.get(
FacebookParam.CANVAS_USER.getSignatureName() );
String sessionKey = fbParams.get( FacebookParam.SESSION_KEY.getSignatureName() );
String expiresS = fbParams.get( FacebookParam.EXPIRES.getSignatureName() );
if ( userS != null && sessionKey != null && expiresS != null ) {
apiClient.setCacheSession( sessionKey, Long.parseLong( userS ), Long.parseLong(
expiresS ) );
+ } else if ( canvasUser != null ) {
+ apiClient.setCacheSession( sessionKey, Long.parseLong( canvasUser), 0L );
}
}
{
Original comment by polarys@gmail.com
on 23 Sep 2008 at 4:10
Totally agree. Thanks for posting this, I will also continue to post fixes for
getting the "new profile" functionality into our library. Eventually one day
we
will be totally "new profile" compliant :)
Original comment by hahna...@gmail.com
on 23 Sep 2008 at 5:20
fixed, svn 339. (2.0.2-SNAPSHOT)
thank you for the heads up and patch. I also applied the change to
FacebookWebRequest, if you want to look at that class.
Original comment by fern...@gmail.com
on 30 Sep 2008 at 4:10
Original issue reported on code.google.com by
polarys@gmail.com
on 8 Sep 2008 at 7:15