Note that there are some explanatory texts on larger screens.

plurals
  1. POapp-engine-patch and pyFacebook not working
    primarykey
    data
    text
    <p>I am trying to write a facebook app using app-engine-patch and pyFacebook. I am using nothing but the examples provided with each tool and for some reason it will not work.</p> <p>I have combined the two just as described in the accepted answet here: <a href="https://stackoverflow.com/questions/984071/facebook-django-and-google-app-engine">Facebook, Django, and Google App Engine</a></p> <p>app-engine-patch seems to work just fine but when I try to use @facebook.require_login() I get this from GAE's logs:</p> <pre><code>Exception in request: Traceback (most recent call last): File "/base/data/home/apps/app-name/1.339079629847560090/common/zip-packages/django-1.1.zip/django/core/handlers/base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/base/data/home/apps/app-name/1.339079629847560090/facebook/djangofb/__init__.py", line 87, in newview if not fb.check_session(request): File "/base/data/home/apps/app-name/1.339079629847560090/facebook/__init__.py", line 1293, in check_session self.session_key_expires = int(params['expires']) ValueError: invalid literal for int() with base 10: 'None' </code></pre> <p>This happends no matter which view I decorate with @facebook.require_login()</p> <p>I am using the latest from both projects and I have no idea why it wont work.</p> <p>Many thanks for your time.</p> <p><strong>UPDATE:</strong> I made a quickfix for pyFacebook, but I just forgot to put it back in the thread.</p> <p>Now also as an answer, since it seems to be the only way.</p> <p>If you change facebook/__init__.py line 1292+ from this:</p> <pre><code> if params.get('expires'): self.session_key_expires = int(params['expires']) </code></pre> <p>To this:</p> <pre><code> if params.get('expires'): if params['expires'] == 'None': params['expires'] = 0 self.session_key_expires = int(params['expires']) </code></pre> <p>It will work, but it is a hack and maybe it could be done more elegantly, but it works. Gotta point the pyFacebook devs to this thread, maybe they will have a better solution.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload