Hiya,

I'm a bit of a newbie, so I apologize if the answer to this question is 
obvious. I'm having a bit of trouble using the python linkedin library 
(http://code.google.com/p/python-linkedin/).

When I attempt to use the library from an interactive Python interpreter, it 
works great:

import sys; print('%s %s' % (sys.executable or sys.platform, sys.version))
/Library/Frameworks/Python.
framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python 2.5.4 
(r254:67917, Dec 23 2008, 14:57:27) 
[GCC 4.0.1 (Apple Computer, Inc. build 5363)]
>>KEY = "xxxxxx"
>>SECRET = "xxx"
>>RETURN_URL = "http://localhost:8080/settings/linkedin/return";
>>from linkedin import linkedin
>>api = linkedin.LinkedIn(KEY, SECRET, RETURN_URL)
>>result = api.requestToken()
>>print result
True
>>print api.getRequestTokenError()
None


However, when I wrap a Google App Engine webapp.RequestHandler around it, I 
get an error:

from linkedin import linkedin


from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app


class LinkedInSettings(webapp.RequestHandler):
    def get(self):
        KEY = "xxxx"
        SECRET = "xxxx"
        RETURN_URL = "http://localhost:8080/settings/linkedin/return";
        api = linkedin.LinkedIn(KEY, SECRET, RETURN_URL)
        result = api.requestToken()
        print result
        print api.getRequestTokenError()
        
application = webapp.WSGIApplication([('/settings/linkedin.*', 
LinkedInSettings)])


def main():
    run_wsgi_app(application)

if __name__ == "__main__":
    main()


This a request to http://localhost:8080/settings/linkedin will print out:

False
signature_invalid
Status: 200 OK
Content-Type: text/html; charset=utf-8


Cache-Control: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Content-Length: 0

Have anyone ever encountered this behavior before? Do you happen to have any 
ideas as to what is going on that might explain why the signature is valid 
when the code is executed from the interpreter, but invalid when executed 
within the webapp.RequestHandler class?

Thank you for time,

Regards,

John

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/DJNLZfBcZhgJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to