Hi brothers, I have this code:

Dim p_service As Google.GData.Client.Service = New 
Google.GData.Photos.PicasaService("Auth_test_app")
Dim p_parameters As New Google.GData.Client.OAuth2Parameters()
Dim p_application_name As String = "test_app"

'STEP 1 - configure how to use OAuth 2.0
Dim CLIENT_ID As String = "xxxxxxx.apps.googleusercontent.com"
Dim CLIENT_SECRET As String = "xxxxxx"
Dim SCOPE As String = "http://picasaweb.google.com/data/";
Dim REDIRECT_URI As String = "xxxxx:2.0:oob"

 'STEP 2 - set up the OAuth 2.0 object
p_parameters.ClientId = CLIENT_ID
p_parameters.ClientSecret = CLIENT_SECRET
p_parameters.RedirectUri = REDIRECT_URI
p_parameters.Scope = SCOPE

 'STEP 3 - get the authorization url
Dim authorizationUrl As String = 
Google.GData.Client.OAuthUtil.CreateOAuth2AuthorizationUrl(p_parameters)

 'I have my access token with :) Process.Start(authorizationUrl)
p_parameters.AccessToken = "xxx"

Dim requestFactory As New 
Google.GData.Client.GOAuth2RequestFactory(Nothing, p_application_name, 
p_parameters)
p_service.RequestFactory = requestFactory 'once set we dont need to do 
OAuth until expires

*'ERROR HERE!!!!!!!!!*

dim user_id ="104929871952334xxxxx"
dim album_id ="60664808827372xxxxx"

Dim postUri As New Uri(PicasaQuery.CreatePicasaUri(user_id, album_id))

'My image url :)
Dim fileInfo As New System.IO.FileInfo("C:\Users\1.jpg")
Dim fileStream As System.IO.FileStream = fileInfo.OpenRead()

'NOW ERROR
 Dim request = p_service.Insert(postUri, fileStream, "image/bmp", "Name 
Image.")

*EXECUTE PROGRAM.*

*Execution of request failed: 
https://picasaweb.google.com/data/feed/api/user/104929871952334xxxxx/albumid/60664808827372xxxxx*

Please help me, how repare my error :(

Thanks all!!! and greetings

-- 
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-picasa-data-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to