Domanda

I'm trying to make my first facebook tab app with django.

I did some resarch and found out that fandjago is the best.

So I'm using it , but when I try to require users to authorize I use the decorator

facebook_authorization_required

see : https://fandjango.readthedocs.org/en/latest/usage/authorization.html

I get the following error :

{
   "error": {
      "message": "Invalid redirect_uri: Given URL is not allowed by the Application     configuration.",
      "type": "OAuthException",
      "code": 191
   }
}

with this url:

https://graph.facebook.com/oauth/authorize?scope=publish_stream%2C+publish_actions%2C+user_photos&redirect_uri=https%3A%2F%2Fwww.facebook.com%2Fpages%2FWissals-testing%2F368147096656989%3Fid%3D368147096656989%26sk%3Dapp_269443246412431&client_id=269443246412431

This is my redirect uri :

facebook_redirect_uri = "https://www.facebook.com/pages/mypage-testing/36814709662989?id=36814709686989&sk=app_26944328962431"

Please tell me what I am doing wrong, I searched all topics related to th eissu but couldn't figure it out

EDITED

It worked,I had to add my url in my app configuration "Valid OAuth redirect URIs" But the problem now is that it gets me out of my app to that url, although I need it to stay on the app!!

È stato utile?

Soluzione 2

I finlly solved it

I had to add the same url of my facebook_redirect_uri to my app settings in facebook, advanced tab, field named : Valid OAuth redirect URIs

Altri suggerimenti

I'm taking a guess here,

you might need to set FANDJANGO_AUTHORIZATION_DENIED_VIEW to fully contain your canvas url

The URL to redirect to after the user clicks a button in the dialog. The URL you specify must be a URL of with the same Base Domain as specified in your app's settings,

A Canvas URL of the form

https://apps.facebook.com/YOUR_APP_NAMESPACE

or a Page Tab URL of the form

https://www.facebook.com/PAGE_USERNAME/app_YOUR_APP_ID
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top