hi. Are you able to upload now? If you can, please email me your
solution. My email is [email protected]

thank you very much
TuanSandman

On Jul 12, 7:43 pm, Bala <[email protected]> wrote:
> Hi,
> I am unable to add an album and image (tried to add to an existing
> album) using Javascript Google Picasa Web Albums API. I am getting an
> error message "Modification only allowed with api authentication." I
> have properly authenticated using AuthSub authentication and I am
> successfully able to retrieve my albums.
>
> In place of userID I have tried the following options - default/
> emailId/[email protected]. But for all cases I am getting the same
> error.
>
> Below is the javascript function.
>
> var addPicasaAlbum = function (){
>     var access = 'public';
>     var location = 'MyLocation';
>     var term = 'http://schemas.google.com/photos/2007#album';
>     var scheme = 'http://schemas.google.com/g/2005#kind';
>     var commentingnabled = 'true';
>     var xmlns$media = 'http://search.yahoo.com/mrss/';
>     var xmlns$gphoto='http://schemas.google.com/photos/2007';
>     var entry = new google.gdata.Entry();
>     var category = new google.gdata.Kind();
>     category.setTerm(term);
>     category.setScheme(scheme);
>     entry.addCategory(category);
>     entry.setTitle(google.gdata.Text.create("Test"));
>     entry['xmlns$media'] = xmlns$media;
>     entry['xmlns$gphoto'] = xmlns$gphoto;
>     entry['gphoto$access'] = {$t:access};
>     entry['gphoto$location'] = {$t:location};
>     entry['gphoto$commentingEnabled'] = {$t:commentingnabled};
>     var mediaGroup = new google.gdata.mediarss.MediaGroup();
>     var mediaKeywords = new google.gdata.mediarss.MediaKeywords();
>     mediaKeywords.$t = "keyword";
>     mediaGroup.setKeywords(mediaKeywords);
>     entry['media$group'] = mediaGroup;
>     service = new google.gdata.client.GoogleService('lh2', 'Picasa
> Album');
>     service.insertEntry('http://picasaweb.google.com/data/feed/api/
> user/default',entry, handleAddPicasaAlbum, handleError,
> google.gdata.Entry);
>
> };
>
> var addPicasaImage = function(albumId){
>     var term = 'http://schemas.google.com/photos/2007#photo';
>     var scheme = 'http://schemas.google.com/g/2005#kind';
>     var entry = new google.gdata.Entry();
>     var scope = 'http://picasaweb.google.com/data/feed/api/user/
> default/albumid/'+albumId;
>     var mediaEntry       =      new google.gdata.gbase.MediaEntry();
>     var mediaContent = new google.gdata.mediarss.MediaContent();
>     mediaContent.setType('image/jpeg');
>     mediaContent.setUrl('C:\Users\admin\Pictures\Test.jpg');
>     mediaEntry.setMediaContent(mediaContent);
>     mediaEntry.setSummary("MyPhoto");
>     mediaEntry.setTitle("MyPhoto");
>     var category = new google.gdata.Kind();
>     category.setTerm(term);
>     category.setScheme(scheme);
>     mediaEntry.addCategory(category);
>     service = new google.gdata.client.GoogleService('lh2', 'Picasa
> Album');
>     service.insertEntry(scope,mediaEntry, handleAddPicasaImage,
> handleError, google.gdata.Entry);
>
> }
>
> Can someone please help me out.
>
> Thanks
> Bala

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-picasa-data-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to