Updated deprecated items from 1.2, added picture for linkedin, using json response from linkedin #8

Merged
merged 4 commits into from May 7, 2012

Projects

None yet

2 participants

@tgriesser
  1. Updated \Fuel_Exception and \Input::get_post to \FuelException and \Input::param respectively

  2. Returning linkedin response as json rather than xml for consistency with other libs, added picture to user info array (similar to twitter)

  3. Fixed a pass-by-reference error I was seeing on end(explode('/', $user['public-profile-url'])) with the linkedin lib

@philsturgeon philsturgeon and 1 other commented on an outdated diff May 7, 2012
classes/provider/linkedin.php
@@ -37,10 +37,15 @@ public function url_access_token()
return 'https://api.linkedin.com/uas/oauth/accessToken';
}
+ public function last($array)
+ {
+ return end($array);
@philsturgeon
philsturgeon May 7, 2012

Why does this exist?

@tgriesser
tgriesser May 7, 2012

It's being used on line 65 $this->last(explode('/', ... because end(explode('/' was giving an "only variables should be passed by reference" error because end() uses a reference, and the result from the explode call can't be used directly.

I could just set a variable as the result of the explode in the get_user_info function if that would be preferable.

@philsturgeon
philsturgeon May 7, 2012

Yes please just set the variable and grab the last item that way. I know it's silly, but I don't like the idea of adding an undocumented method just for this. The rest of the PR is perfect :)

@tgriesser
tgriesser May 7, 2012

Sounds good, updated.

@philsturgeon philsturgeon merged commit 205ea1b into fuel-packages:master May 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment