I want to share my website onto facebook and perform a function if the facebook share is success.
I have used Facebook Javascript SDK with display : 'popup'. The share functionality is working fine but opens my page in a new tab which is causing problem executing my function. The issue is only for mobile browser. It is working as expected in desktop
Here is my code:
FB.ui({
display: 'popup',
method: 'share',
href: 'https://www.mywebsite.com/mypage',
},
function(response) {
if (response != 'undefined' && response instanceof Array) {
loadAutoPopup_thanksfb();
}
});
});
I tried With display : 'iframe' method, but it did not solve my problem Please help in return to same page after facebook share for mobile browser