开发者

Google App Engine Facebook App Authentication

Hey everyone, I am trying to create an app in the google app engine for facebook, but I somehow got it caught in an infinite loop, and I can't figure out what to do to stop it. I copied some code from here

http://shelftalkers.googlecode.com/svn/trunk/shelftalkers/shelftalkers.py

to do the authentication, specifically this:

fb = facebook.Facebook(FACEBOOK_API_KEY, FACEBOOK_APP_SECRET)

    if fb.check_session(self.request) and fb.added:
        pass
    else:
        url = fb.get_add_url()
        self.response.out.write('<script language="javascript">top.location.href="' + url + '"</script>')
        return

And when I try to go to the page, it makes me authenticate, and then gets caught in a loop, so I am assuming that my if statement is fail, but I don't know what to do inst开发者_如何学运维ead.

I am actually uploading this to facebook, so I don't think that the external authentication is the same. Any ideas on how to fix this? Thanks in advance

WWaldo


Hey WWaldo, I also had problems with facebook authentication until I found a good app to learn from. At github.com there is a pretty good newer project that solves this problem. It is called runwithfriends and also is a facebook app where we can view exactly how it's done.

Cheers

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜