Question

Firstly, I am running CI 2.0.3. Using good ol' google, it wasn't difficult to find code to achieve my current problem. I have found these sources, but they have been written using 1.7.2:

http://www.sudhircodes.com/main/codeigniter/status-update-to-linkedin/ http://blog.justni.com/posting-to-linkedin-from-php-and-codeigniter/

I am able to hit linkedin, put in my user credentials for authorising the application.

I get this back:

http://www.domain.com/auth/linkedin_auth?oauth_token=ffdd1d7f-29a3-423c-ada7-a85d31bec080&oauth_verifier=97677

But the problem is if in the config: $config['uri_protocol'] = 'AUTO';

Then a 302 occurs and gets turned into http://www.domain.com/auth/linkedin_auth No oauth_token.

If you then have $config['uri_protocol'] = 'QUERY_STRING'; No 302 occurs, so the querystring is intact, instead I get "The URI you submitted has disallowed characters"

No problem, just change $config['permitted_uri_chars'] right? Wrong, I change it and even set it to blank and I just get an HTTP loop where it keeps on hitting /auth/linkedin_auth.

So has anyone managed to get CI 2.0.3 play nice with linkedin? I'm slowly going bald! :p

Thanks

Was it helpful?

Solution

I'll marked this as answered.

I've gone back and tried with a new install of CI. It works. So there must be a gremlin somewhere else in my code :(

Edit: Found out that the Twitter library from Elliot Haughin manages to intercept the querystring when a twitter & linkedin or anysite returns back oauth_token or oauth_verifier to yours when doing an auth. So I've had to come up with my own CI class extending the one from Tijs Verkoyen.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top