window.fbAsyncInit = function() {
FB.init({
appId : 'app_id',
autoLogAppEvents : true,
xfbml : true,
version : 'v3.2'
});
FB.Event.subscribe('send_to_messenger', function(response) {
if ( response.event == 'clicked' ) {
};
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "https://connect.facebook.net/en_US/sdk.js";
// js.src = "https://connect.facebook.net/en_US/sdk/debug.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
I am trying to execute the facebook send to messenger api by using facebook javascript sdk . I already have an app which have the webhook events subscribed .So i want to find the psid after clicking the fb-send-to-messenger .