Facebook Permissions Popup

I am creating an application on a Facebook page and I need to get additional permissions from my users, this causes a pop-up window that many people have blocked, I remember how many applications were sent to grant a page with a callback URL to deal with this .

Is it devoid of? If not, then how can I use the embedded page and not pop up?

I'm sorry if this sounds like a lazy question, but I have been doing Facebook for so long and their API seems like a massive moving target, any advice would be greatly appreciated.

Thanks.

+4
source share
3 answers

Try this little feature in direct Javascript.

<script> function addPermissions(permissions){ FB.login(function(response) { if (response.session) { if (response.perms) { // user is logged in and granted some permissions. } else { // user is logged in, but did not grant any permissions } } else { // user is not logged in } }, {perms:permissions}); } </script> <a onclick="addPermissions("email, publish_stream,...");">Click me</a> 
+7
source

If you don’t click on the page to load the page and do so in response to the link / button, click the pop-up blocker to not block it, otherwise the user will actually ask Pop to work. (I worked like that)

You can also create the appropriate authorization URL and simply send the user there.

Initially, you send them there through dialogue or redirection. You can simply send them there again asking for additional aka Scope permissions.

More details:

https://developers.facebook.com/docs/authentication/

The dialog box URL may appear in a new window or redirect to it. A new window usually appears from the Javascript API.

0
source

I believe the popup method is out of date. The standard method is to redirect to the facebook oauth dialog with a callback. There is an alternative popup method for iframe applications, which is not a popup that would be blocked, but rather an ajax popup.

The information required to use the above dialog box is located at http://developers.facebook.com/docs/reference/dialogs/oauth/

0
source

Source: https://habr.com/ru/post/1368936/


All Articles