I have a PhoneGap wrapped website and am trying to use the childbrowser plugin to allow someone to share a link on Facebook. After the link posts I would like to close the childbrowser window to return to the app.
cb.onLocationChange = function(loc) {
if (loc.indexOf("https://m.facebook.com/profile.php") >= 0) {
window.plugins.childBrowser.close();
}
};
I'm using onlocationChange to detect when the page is updated, however it doesn't detect the change between posting the link and going to the wall. When you are on the wall refreshing childbrowser will detect the new window and close it correctly. I want to find a way to either allow childbrowser to detect the post event to close the window, or something similar to allow the childbrowser to close without the refresh.
I also don't want to add another plugin or extension if possible.