Hi Guys,

How can I retrieve the access control list of an Album?
I am using OAuth with the Consumer Key and Consumer Secret.
I can't seems to get the feed of "http://schemas.google.com/acl/2007";.

Thanks and appreciate for the help.

Below if my code:

Dim requestFactory As New GOAuthRequestFactory(CONST_PICASA_SERVICE,
CONST_PICASA_ALBUM_APP_NAME)
requestFactory.ConsumerKey = GoogleConsumerKey
requestFactory.ConsumerSecret = consumerSecret

Dim service As New PicasaService(CONST_PICASA_ALBUM_APP_NAME)
service.RequestFactory = requestFactory
service.RequestFactory.UseSSL = True

Dim query As New AlbumQuery()
query.Uri = New Uri(PicasaQuery.CreatePicasaUri(userID))
query.OAuthRequestorId = userID
query.Thumbsize = "144c"

Dim feed As PicasaFeed = service.Query(query)
Dim albums As New List(Of Object)

While feed IsNot Nothing AndAlso feed.Entries.Count > 0
       For Each entry As PicasaEntry In feed.Entries

                    Dim link As AtomLink =
entry.Links.FindService(AclNameTable.LINK_REL_ACCESS_CONTROL_LIST,
Nothing)
                    If Not link Is Nothing Then
                        Dim aclQry As AclQuery = New
AclQuery(link.HRef.ToString.Trim)
                        aclQry.OAuthRequestorId = userID

                        aclQry.Etag = entry.Etag


                        Dim aclFeed As AclFeed =
CType(service.Query(aclQry), AclFeed)

                        For Each acl As AclEntry In aclFeed.Entries
                            Console.WriteLine(acl.Scope.Type.ToString)
 
Console.WriteLine(acl.Scope.Value.ToString)
                            Console.WriteLine(acl.Role.Value.ToString)
                        Next
                    End If

                    Dim alb As Album = New Album
                    alb.AtomEntry = entry
                    albums.Add(alb)
                Next

                If feed.NextChunk IsNot Nothing Then
                    Dim nextChunkUri As Uri = New Uri(feed.NextChunk)
                    query.Uri = nextChunkUri
                    query.OAuthRequestorId = userID
                    feed = service.Query(query)
                Else
                    feed = Nothing
                End If

End While

-- 
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