How can I redirect once facebook like button is clicked?

后端 未结 1 1302
误落风尘
误落风尘 2020-12-18 16:49

Basically, here is an idea: I am starting a daily blog, and in order to gain access to sunday\'s posts, the user needs to share the site. I have figured out how to redirect

相关标签:
1条回答
  • 2020-12-18 17:08

    While what you are doing is not a good idea at all, redirecting after clicking the "Like" button can be handled with the Facebook javascript event, edge.create:

    FB.Event.subscribe('edge.create',
        function(response) {
            location.href = 'http://yourdomain.com/post/id';
        }
    );
    
    0 讨论(0)
提交回复
热议问题