janoliver
janoliver

Reputation: 7824

Grant additional permissions inside a facebook app

I am developing a facebook app, that only exists inside a canvas on facebook. (iframe) After a click on a certain link, I want to display the modal window of facebook that requests the user to add the app and grant it permissions. However, the only thing I can find on this is FB.login, that

  1. is not capable of showing the popup as a javascript popup/layer
  2. tries to log the user in on my app, which I don't want. I want that "add app" dialog with the permission granting.

Is this even possible? The FB.login() function only has the options popup and page (where the first one is real popup and the second one a page on facebook).

I am using the JS SDK and OAuth 2.0.

Upvotes: 0

Views: 1526

Answers (2)

LIonel
LIonel

Reputation: 11

I think you can use the following: https://www.facebook.com/dialog/pagetab?=APPID&next=CANVASS_URL

Remember to replace APPID and CANVASS_URL with your details

Upvotes: 1

CarpeNoctumDC
CarpeNoctumDC

Reputation: 1760

In order for you to get premissions for a page the user has to "log in" to your app. By logging in they grant your app access to their information within the scope of the requested premissions.

This is a core concept of the OAuth flow. Your app (client) requests authorization and premission from the authorization server (Facebook login) to access protected resources (Facebook information).

Checkout facebooks sample canvas app that uses the JavaScript SDK:

http://developers.facebook.com/docs/samples/canvas/

Upvotes: 1

Related Questions