Facebook login without pop-up?

前端 未结 5 1117
一向
一向 2020-12-08 08:18

I\'m trying to make a simple facebook app, but for the authorization, it seems that it\'s always blocked by a popup-blocker. My code is thus:

FB.init({
              


        
5条回答
  •  广开言路
    2020-12-08 09:14

    The popup blocker will always initiate if the Popup action did not originate in an event caused by a user. For example, if you try and do a popup on a load event, the browser will most likely use the popup blocker. On the other hand, if you trigger the popup on a click event or keydown event, it is less likely that the popup blocker will be triggered.

    You could also employ a method that has your application detect whether or not the popup was blocked. You can read more about that here.

    As mentioned in other answers, if you'd rather do the authentication process without popups at all, you would need to handle this at the server side using OAuth.

提交回复
热议问题