huuanh1987 / facebook-java-api

Automatically exported from code.google.com/p/facebook-java-api
0 stars 0 forks source link

2.0.2 FacebookWebappHelper - add method to retrieve canvas user id #117

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently (as of SVN revision 352) FacebookWebappHelper does not have a method 
to return the 
ID of any canvas user detected during the construction. Could we save the 
canvas user id and 
add a method to return that id?

+   protected Long canvasUser;

-   apiClient.setCacheSession( null, Long.parseLong( canvasUserS ), null );
+   canvasUser = Long.parseLong( canvasUserS );
+   apiClient.setCacheSession( null, canvasUser, null );

+   /**
+    * Returns the id of any canvas user
+    */
+   public Long getCanvasUser() {
+       return this.canvasUser;
+   }

Original issue reported on code.google.com by cda...@gmail.com on 9 Oct 2008 at 7:02

GoogleCodeExporter commented 8 years ago
client.getCacheUserId() returns the canvas user or the plain old "user" 
depending on
which page has been loaded. It would be incorrect to introduce a separate 
method.
Users shouldn't care where the data came from, just that it's the correct user 
being
reported.

Original comment by david.j....@googlemail.com on 2 Dec 2008 at 10:14