This can be done easily if you have a control to find the visitor is first time coming to your site.
Set a persistent cookie once the use visists your site for the first time. Example Set a cookie called persistCookie to true/1. If the user visits for the next time check the cookie (persistCookie) exists/enabled to true.
var persistCookie = getCookie("persistCookie");
With a simple condition below you can have a control over the fb like popup,
/* Check the cookie exists in IN your Domain*/
if (persistCookie) {
/*If cookie exists check the autoopen false*/
$("#dialog").dialog({
autoOpen: false
});
} else {
/*If cookie exists check the autoopen True*/
$("#dialog").dialog({
autoOpen: true
});
}
Sample Demo listed here.