Permalink
Browse files

Added Flickr permissions to strategy config

  • Loading branch information...
1 parent 20e1b8d commit a5021c77f713d05cf3c42ebb186330b24affd727 @danielcosta danielcosta committed Mar 3, 2013
Showing with 5 additions and 3 deletions.
  1. +5 −3 FlickrStrategy.php
View
8 FlickrStrategy.php
@@ -22,6 +22,7 @@ class FlickrStrategy extends OpauthStrategy {
*/
public $defaults = array(
'method' => 'POST',
+ 'perms' => 'read',
'oauth_callback' => '{complete_url_to_strategy}oauth_callback',
'authorize_url' => 'http://www.flickr.com/services/oauth/authorize',
'request_token_url' => 'http://www.flickr.com/services/oauth/request_token',
@@ -78,7 +79,7 @@ public function request(){
session_start();
$_SESSION['_opauth_flickr'] = $results;
- $this->_authorize($results['oauth_token']);
+ $this->_authorize($results['oauth_token'], $this->strategy['perms']);
}
}
@@ -158,9 +159,10 @@ public function oauth_callback(){
}
}
- private function _authorize($oauth_token){
+ private function _authorize($oauth_token, $perms){
$params = array(
- 'oauth_token' => $oauth_token
+ 'oauth_token' => $oauth_token,
+ 'perms' => $perms
);
$this->clientGet($this->strategy['authorize_url'], $params);

0 comments on commit a5021c7

Please sign in to comment.