@@ -91,7 +91,7 @@ and include the code on the top of your file:
91
91
ChipVN_ClassLoader_Loader::registerAutoLoad();
92
92
93
93
then
94
- ### Upload to Picasa.
94
+ ### Upload to Picasa - ver 1
95
95
To upload image to Picasa, you need to have some AlbumIds otherwise the image will be uploaded to _ default_ album.
96
96
To create new AlbumId faster, you may use echo ` $uploader->addAlbum('testing 1'); `
97
97
@@ -103,6 +103,36 @@ To create new AlbumId faster, you may use echo `$uploader->addAlbum('testing 1')
103
103
echo $uploader->upload(getcwd(). '/test.jpg');
104
104
// this plugin does not support transload image
105
105
106
+ ### Upload to Picasanew - ver 2 (use OAuth 2.0)
107
+ To upload image to Picasanew, you need to have some AlbumIds otherwise the image will be uploaded to _ default_ album.
108
+ To create new AlbumId faster, you may use echo ` $uploader->addAlbum('testing 1'); `
109
+
110
+ $uploader = ChipVN_ImageUploader_Manager::make('Picasanew');
111
+ $uploader->login('your user name', ''); // we don't need password here
112
+ $uploader->setApi('Client ID'); // register in console.developers.google.com
113
+ $uploader->setSecret('Client secret');
114
+ // you can set upload to an albumId by array of albums or an album, system will get a random album to upload
115
+ //$uploader->setAlbumId(array('51652569125195125', '515124156195725'));
116
+ //$uploader->setAlbumId('51652569125195125');
117
+ if (!$uploader->hasValidToken()) {
118
+ $uploader->getOAuthToken('http://yourdomain.com/test.php');
119
+ }
120
+ echo $uploader->upload(getcwd(). '/test.jpg');
121
+ // this plugin does not support transload image
122
+
123
+ ### Upload to Flickr
124
+ To upload image to Picasa, you need to have some AlbumIds otherwise the image will be uploaded to _ default_ album.
125
+ To create new AlbumId faster, you may use echo ` $uploader->addAlbum('testing 1'); `
126
+
127
+ $uploader = ChipVN_ImageUploader_Manager::make('Flickr');
128
+ $uploader->setApi('API key');
129
+ $uploader->setSecret('API secret');
130
+ $token = $uploader->getOAuthToken('http://yourdomain.com/test.php');
131
+ $uploader->setAccessToken($token['oauth_token'], $token['oauth_token_secret']);
132
+
133
+ echo $uploader->upload(getcwd(). '/test.jpg');
134
+ // this plugin does not support transload image
135
+
106
136
### Upload to Imageshack
107
137
108
138
$uploader = ChipVN_ImageUploader_Manager::make('Imageshack');
0 commit comments