FB.UI SCRIPT FOR SHARE DIALOG

Discussion in 'Facebook API' started by Bhojoy007, Jun 28, 2017.

  1. #1
    Hi,

    I really need some help who really knows tweaking the Facebook Share Dialog which is the FB.UI SDK..

    What i want is after successfully shared into facebook timeline the response or callback will be call or get a template_part which is inside in the popup window mode.

    This is my code... it will successfully posted into the timeline but after that nothing happen..

    <script>
    document.getElementById('shareBtn').onclick = function() {
    FB.ui({
    method: 'share',
    display: 'popup',
    href: '<?php echo get_permalink();?>',
    }, function(response){
    if (response && !response.error_message) {
    alert('Posting completed.');
    $(function(){
    $('#content') .load ('/yith-wacp-popup.php');

    });
    } else {
    alert('Error while posting.');
    }

    });
    }

    </script>


    please help
     
    Bhojoy007, Jun 28, 2017 IP