AnsweredAssumed Answered

Facebook integration bug fix for libraries.post.js

Question asked by jpotts Moderator on Dec 11, 2007
Latest reply on Dec 11, 2007 by davidc
There's a bug in libraries.post.js. Using the latest build (rev 1374 of community HEAD) if you are looking at a list of documents in someone else's library, you will see a link that says "Back to John Smith's Libraries". If you click on that link you will see John Smith's context but your list of libraries instead of John Smith's libraries.

The bug is fixed by editing libraries.post.js and changing the code to use the argument passed to the web script (which is the FB user ID of the user who's libraries you want to see) instead of the user ID of the currently logged in user.

So change:

  var userFolder = appFolder.childByNamePath("FB" + facebook.user);
  if (userFolder == undefined)
  {
    if (parseInt(facebook.user) != parseInt(url.extension))
    {
      status.code = 500;
      status.message = "User " + url.extension + " does not have a document libraries folder";

To:


  var userLib = url.extension;
  var userFolder = appFolder.childByNamePath("FB" + userLib);
  if (userFolder == undefined)
  {
    if (parseInt(facebook.user) != parseInt(userLib))
    {
      status.code = 500;
      status.message = "User " + userLib + " does not have a document libraries folder";

Outcomes