googlecodelabs / photos-sharing

Code for the "Build a Photo Sharing app with Google Photos and Flutter" codelab
Apache License 2.0
98 stars 76 forks source link

User that joined can't upload image #20

Closed calvinleonardi closed 3 years ago

calvinleonardi commented 4 years ago

Hi what do I need to add so joined user can upload image on that album too?

calvinleonardi commented 4 years ago

help please ?

jfschmakeit commented 4 years ago

Is the second user able to see the trips (or albums) that the first user has created? Are you using the same google services configuration to run the app for both users?

The application is set up so that users authenticate the same application for their Google Photos library, which means that when you have completed the codelab (after step 9), users that have joined the album using the shareToken will also be able to upload media into the same album.

Are you receiving an error when completing this step?

calvinleonardi commented 4 years ago

Annotation 2020-04-29 145044

Yes the second user can see the album that first user created I got no error on that but i think this is the problem what is 'isCollaborative': instance.isCollaborative, ? because when I see on my google photos album, the album that I created using the app isn't collaborative that means only the first user can upload photo and second user cannot

I have tried to make the collaborative true but the album on google photos still not become collaborative Annotation 2020-04-29 145536

calvinleonardi commented 4 years ago

Annotation 2020-04-29 145657

on the google photos documentation it says "True if the shared album allows collaborators (users who have joined the album) to add media items to it. " but i have changed it and it still do nothing

calvinleonardi commented 4 years ago

hello anybody here?

jfschmakeit commented 4 years ago

This seems to be a bug in the codelab - the sharedAlbumOptions aren't set when the album is shared. The default values are used instead, which means that isCollaborative is false. Others can join the album, but they won't be able to contribute and add photos.

This requires some additional work (namely the call in photos_library_api_client#shareAlbum(..) needs to be updated to support specifying the sharedAlbumOptions in the body of the request as described here: https://developers.google.com/photos/library/guides/share-media#sharing-album )

jfschmakeit commented 3 years ago

Closing the loop here - this has been fixed as part of the migration of this codelab to the flutter/codelabs repository. See https://github.com/flutter/codelabs/commit/19ece981729f5b8952dcfd13d0eea977c6293ce5