开发者

Facebook connect via django-socialregistration

I'm trying to add Facebook connect to my project. I've searched the web and came across to django-socialregistration.

I followed all required instructions and all of them works properly. I've created a test page and put all necessary tem开发者_如何学Goplate_tags and Facebook button is shown my page. The problem is when I'm trying to connect via Facebook, i'm redirected to an error page which says :

API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: redirect_uri is not owned by the application.

Possibly my app settings are wrong. Here is my app settings for my domain :

Site URL : http://localhost:8000/test
Site Domain : localhost

I thought, I'm getting this error because the django-socialregistration redirects my page to its previously defined url. I found that, it uses _get_next() function. But I couldn't figure out how to pass my own url to this function.

So, how can i resolve this error ? From my app settings ?


The problem is that Facebook is not working properly with localhost domains. What I am usually doing is adding a host name example.com to my /etc/hosts file as an alias for localhost. When you then change you site URL to http://example.com/test and the domain to example.com it should work with Facebook.

Not sure this is really fixing your problem since I never had this particular error message.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜