Sunday, January 2, 2011

Testing Facebook API on Local Host

I am developing a django site using django-socialregistration. I am using the django development server.

I setup the facebook app via http://www.facebook.com/developers/apps.php

This page let me get the API_KEY and SECRET_KEY.

Without setting any other settings, I got this error:

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.

The facebook app settings include settings for:
  • Site URL
  • Site Domain
When I set:

Site URL: http://127.0.0.1:8000/
Site Domain:

I was able to test the api.

2 comments:

  1. Thank you! I was looking for this, and somehow, couldn't think of it before. (I assumed I had to had something on Site Domain and it never worked.)

    Thanks!

    ReplyDelete
  2. IMPORTANT COMMENT!!!: If you are using some local tester (like XAMP) use the code direction ( http://127.0.0.1:xx) insted of localhost:xx*.

    *XX is the port that you set

    ReplyDelete