2012-01-27 67 views
0

我正在啓動Facebook應用。繼Getting Started tutorial in the Authorization section,它說我應該使用這個網址來獲取用戶的權限:使用OAuth對話框facebook應用不允許使用畫布URL作爲redirect_uri

https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_CANVAS_PAGE 

我與我的畫布網址替換YOUR_CANVAS_PAGE,一個我在我的應用程序設置,請參見:

https%3A%2F%2Fapps.facebook.com%2F238620302882463%2F 

但,那麼,如果我瀏覽到該頁面時,我得到以下錯誤:

An error occurred with Elecciones 2012. Please try again later. 

API Error Code: 191 
API Error Description: The specified URL is not owned by the application 
Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration. 

如果我更換YOUR_CANVAS_PAGE:

http%3A%2F%2Fwww.example.com%2FElecciones2012 

權限對話框正常工作。但後來我重定向到我的網站,而不是facebook.com內的應用程序

任何想法爲什麼會發生這種情況?

我一直在使用不同的權限對話看到其他應用:

http://www.facebook.com/connect/uiserver.php?app_id=11609831134&method=permissions.request&redirect_uri=http%3A%2F%2Fapps.facebook.com%2Fpetsociety%2F%3Fpf_ref%3Dsb%26ref%3Dts&response_type=none&display=page&perms=email%2Cpublish_actions&auth_referral=1 

但它看起來又是另外一套API的一部分。

回答

0

我也有同樣的問題。看起來問題出現在「Canvas URL」中。你不能使用你的應用程序ID在畫布上的網址,如:

"https%3A%2F%2Fapps.facebook.com%2F238620302882463%2F"

相反,命名空間應作爲你的畫布網址。例如:

"https://apps.facebook.com/myapplication/"

您可以在Facebook的應用程序設置中設置您的應用程序命名空間。

相關問題