Here is the page: http://textbookcentral.com.au/26/university-of-new-south-wales/buy/69897/acct1501/?query=
When "Tell others, I buy a tutorial on my facebook wall." the checkbox is selected, and you click "Request this tutorial", regardless of whether the form input is valid or not, it will try to make a wall post on your facebook wall by opening the login dialog box or the permission dialog as necessary.
However, the dialog does not appear if your browser has blocked pop-ups. I tested this in Safari and Firefox.
javascript only starts when you click the "Request this tutorial" button, but the pop-ups are still blocked, why?
(View the source, scroll down, and you will see the following corresponding code.)
<a href="#" class="submit button" onclick="make_facebook_request_post()">Request this textbook</a></p> </div> </form> </div> <script type="text/javascript"> function make_facebook_request_post() { if ($('#id_facebook').is(':checked')) { facebook.do_post(function(success) {}, 'I am using http://textbookcentral.com.au to buy a textbook for ACCT1501.', 'publish_stream') } } </script>
The facebook.do_post function will call FB.api calls. See http://textbookcentral.com.au/site_media/static/central/js/facebook.js
source share