We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

LinkedIn oAuth and Sessions

Development and Programming

Carl W Crawley's avatar
Carl W Crawley
136 posts
14 years ago
Carl W Crawley's avatar Carl W Crawley

Hi All,

I’m currently writing an addon for a client to pre-populate a profile page with content directly from LinkedIn, however I’m becoming a little unstuck and not sure how to resolve…

I have a module which initiates the LinkedIn Authentication - goes off to LinkedIn, requests oAuth permission and then upon granted redirects back to my URL site.com/index.php?ACT=35&oauth_token=xxxxxxxxx etc…

According to the docs from LinkedIn, I check for the oauth_token presence in the QueryString and then do the following:

$access_token = $_SESSION['laccess_oauth_token'];
$access_token_secret =$_SESSION['laccess_oauth_token_secret'];
$oauth_verifier = $_SESSION['loauth_verifier'];
$oauthc->setToken($access_token,$access_token_secret);

The problem I have is that the $_SESSION[] isn’t available for me, so I can’t get the values to initiate the API calls…

Anyone got any ideas?

If you need any more info - feel free to shout.

Cheers,

C.

       
johnwbaxter's avatar
johnwbaxter
651 posts
14 years ago
johnwbaxter's avatar johnwbaxter

I haven’t used oauth yet so maybe this is a silly question, but how would an external site be able to set $_SESSION data on your server?…

       
johnwbaxter's avatar
johnwbaxter
651 posts
14 years ago
johnwbaxter's avatar johnwbaxter

Oh and shouldn’t you be using $this->EE->session->userdata(‘foo’);?

       
Carl W Crawley's avatar
Carl W Crawley
136 posts
14 years ago
Carl W Crawley's avatar Carl W Crawley

yes ignore me - once I’d posted it, I asked myself the same question…..

I think I’ve found the problem… it was somewhere between the keyboard and chair!

Now to try to reclaim the last few hours of my life!

Rgds,

C.

       
johnwbaxter's avatar
johnwbaxter
651 posts
14 years ago
johnwbaxter's avatar johnwbaxter

It’s nice to see someone else doing what i do regularly 😉

       
Matt:P's avatar
Matt:P
277 posts
14 years ago
Matt:P's avatar Matt:P

Carl, how can the coffee possibly be the problem?

       
Carl W Crawley's avatar
Carl W Crawley
136 posts
14 years ago
Carl W Crawley's avatar Carl W Crawley
Carl, how can the coffee possibly be the problem?

Not enough of it! 😊

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.