Re: [web2py] Re: how to use contrib/login_methods/linkedin_account.py
Using web2py's sample classes as a reference and a lot of code written by Ozgur Vatansever I have written code to OAuth into LinkedIn (built on gluon.contrib.login_methods.oauth10a_account) This enables access to a contact's name, job title, photo company as well as details about their connections. It can also send messages to their LinkedIn account. Alas I find LinkedIn's account quite limiting as it's aimed at enhancing the experience of LinkedIn users during their own sessions and not for providing services when they are not logged in. You're right that no access is given to any of the email addresses of a user but LinkedIn are doing well to protect the value of the service - and as I user I appreciate I can't be spammed. On 14 July 2011 04:32, Luis Goncalves lgoncal...@gmail.com wrote: I didn't. But by doing the authentication manually (that is, in an interactive shell), I was able to connect to linked in. I realized that I wouldn't be able to get the information that I wanted though (email address - never provided by linkedin!), so I gave up. But the web2py linked-in auth is broken, as far as I can tell. The same thing with facebook. I think there are some steps that are just missing in the web2py implementation. I have a simple script that works with facebook auth (I can get all the info from a person and their graph on facebook) -- but I don't know how to integrate that with the web2py auth. If you, or anyone else, wants my facebook login script, I can post it. Luis.
[web2py] Re: how to use contrib/login_methods/linkedin_account.py
did you find a solution? On Jun 26, 8:17 pm, Luis Goncalves lgoncal...@gmail.com wrote: One more clue: In the infinite loop, every loop through the linkedin grant access (/oas/oauth/authorize) page has a new oauth_token, such as https://www.linkedin.com/uas/oauth/authorize?oauth_token=f9eef16e-4f4... L.
[web2py] Re: how to use contrib/login_methods/linkedin_account.py
I didn't. But by doing the authentication manually (that is, in an interactive shell), I was able to connect to linked in. I realized that I wouldn't be able to get the information that I wanted though (email address - never provided by linkedin!), so I gave up. But the web2py linked-in auth is broken, as far as I can tell. The same thing with facebook. I think there are some steps that are just missing in the web2py implementation. I have a simple script that works with facebook auth (I can get all the info from a person and their graph on facebook) -- but I don't know how to integrate that with the web2py auth. If you, or anyone else, wants my facebook login script, I can post it. Luis.
[web2py] Re: how to use contrib/login_methods/linkedin_account.py
An update (getting closer, but still problems): It seems there are a couple more errors in linkedin_account.py: There is an extraneous command which must have been left over from sample code: profile = self.api.GetProfile(profile).public_url = http://www.linkedin.com/in/ozgurv; This line overwrites the reading of the current user's profile, and should be removed. Also, the call return self.api.getAuthorizeURL(self.token) should be return self.api.getAuthorizeURL() according to the python-linkedin module README instructions. With those fixes, I now no longer get the error We were unable to find the authorization token. However, now I am stuck in an infinite loop: I am always stuck on the linkedin Grant access page, and pressing the continue button keeps returning to the same page. I realize that given the existing bugs in the code, it is unlikely that anyone has actually used it, but does anyone have a clue as to why after granting access on linkedin I am not logged in and back to the app? It seems web2py does not respond properly to the access grant. If anyone can help, it will be greatly appreciated!!! Trying to debug Auth() is going to be quite slow and painful to a web2py newbie like me!!! Thanks!!! Luis.
[web2py] Re: how to use contrib/login_methods/linkedin_account.py
One more clue: In the infinite loop, every loop through the linkedin grant access (/oas/oauth/authorize) page has a new oauth_token, such as https://www.linkedin.com/uas/oauth/authorize?oauth_token=f9eef16e-4f45-4f5e-aa5f-82ab18ad3a16 L.