<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="robots" content="noindex, nofollow" /> </head> <body> <script> FB.init({ appId : 'XXX', status : true, cookie : true, xfbml : true }); </script> <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({ appId : 'XXX', // should be replaced with your Facebook Application ID status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); }; </script> <script> function all(){ function(){ FB.getLoginStatus(function(response) { if (response.status == 'connected') { var user_id = response.authResponse.userID; var page_id = "XXX"; //coca cola var fql_query = "SELECT uid FROM page_fan WHERE page_id =" + page_id + " and uid=" + user_id; var the_query = FB.Data.query(fql_query); the_query.wait(function funkcja1(rows) { if (rows.length == 1 && rows[0].uid == user_id) { return true; //here you could also do some ajax and get the content for a "liker" instead of simply showing a hidden div in the page. } else { $("#blokada").show(); //and here you could get the content for a non liker in ajax... } }); } else { // user is not logged in } }); }; function streampublish_popup(){ FB.ui( { method: 'stream.publish', attachment: { name: 'Demo Pulish To Wall With Popup And Call Back Function', description: ( "I have experienced with Share On Wall with Popup windows and would like to share with you. Check it now." ), href: "http://4rapiddev.com/facebook-graph-api/facebook-publish-to-wall-with-popup-or-dialog-and-call-back/", media: [ { 'type':'image', 'src':'http://4rapiddev.com/wp-content/uploads/2011/09/Example-Publish-To-Wall-With-Popup-Windows.jpg', 'href':'http://4rapiddev.com/facebook-graph-api/facebook-publish-to-wall-with-popup-or-dialog-and-call-back/' } ] }, display: 'popup' }, function funkcja2(response) { if (response && response.post_id) { return true; } else { $("#blokada").show(); } }); }; var function1 funkcja2=zmienna2 var function funkcja1=zmienna1 function wynik(){ if (zmienna1 == true && zmienna2 == true) { $("#filmik").show(); }}}; </script> </body> </html>
CHcę, aby po wykonaniu obu warunków pokazała się treść #filmik, w przypadku nie wykoanania jednego, drugiego lub obu na raz aby pokazał się #blokuj.
Co jest źle?
Dodam, że nie działa link, który po kliknięciu ma za zadanie otworzyć popupa do opublokowania wiadomości na facebooku.