Sharing on Facebook from a public kiosk - user cannot log out of FB!

I have a website that is designed to run at a kiosk at public events. I want users to be able to share a page from this site on Facebook without leaving their Facebook session. This is not a Facebook Connect website (there is no login for w / FB synchronization), all I have is a link for sharing goes to Facebook sharer.php:

<a href="http://www.facebook.com/sharer.php?u="http://mysite.com/mypage" target="_blank">share this</a>

It allows the user to log in and send the message in order, but then closes the window and leaves the user logged in. There is no way to log out, so the next user who comes in and wants to share has a previous FB user account!

This seems to have changed when the Facebook user interface recently changed; previously it was redirected to the user profile page after the publication from which they could exit.

How can i fix this? Any recommendations on the “right path” to allow sharing with FB from a public kiosk?

EDIT: I entered an extension request on bugs.developers.facebook.com ( http://bugs.developers.facebook.com/show_bug.cgi?id=9903 ) to provide a user’s sharer.php autograph if login is required. Please vote for him to get some attention from FB!

, facebook window.onbeforeunload iframe ( ). , . , , , , .

window.onbeforeunload = function() {
  if (do_fb_logout) {
    iframe = document.createElement("iframe");
    iframe.setAttribute('width', '0px');
    iframe.setAttribute('height', '0px');
    iframe.setAttribute('frameborder', '0');
    document.body.appendChild(iframe);    
    doc = iframe.contentDocument;
    if (doc == undefined || doc == null)
      doc = iframe.contentWindow.document;
    doc.open();
    doc.write("<html><head></head><body>");
    doc.write("<form id=fbForm name=fbForm method=POST action=http://www.facebook.com/logout.php >");
    doc.write("<input type=hidden name=confirm value=1 /></form>");
    doc.write("<script type='text/javascript'>document.getElementById('fbForm').submit();</"+"script>");
    doc.write("</body></html>");
    doc.close();
  }
}

Windows FF 3.6, IE 7 Chrome.

+3
1

, , - target='_blank' "" Facebook JavaScript. , , , , Facebook .

" ", . , , facebook - uggh.

, , JavaScript mywindow = window.open("http://www.facebook.com/......"), , mywindow. (= ), Facebook, . , , . .

Facebook, , , , .

0

Source: https://habr.com/ru/post/1742501/


All Articles