Search code examples
phpjavascriptjqueryfacebookfacebook-likebox

Pevent Facebook Likebox users from leaving my webpage


My need is as following:

  • I have an iOS mobile phone with a webview component.
  • I use the webview to show my facebook page feeds on the app with Likebox
  • All works fine but when a user clicks on the links from the likebox it leaves the webpage and get redirected to facebook which is normal BUT I WOULD LIKE TO DISABLE THAT FEATURE

Can any body help ?

I can do any work arround using: PHP, jQuery

ideally I would like to keep like button working


Solution

  • You could use jquery to intercept the clicks on any link in that div and then have them return false, right?

    $('#likebox a').click(function() { return false; });
    

    Maybe?