sromku / android-simple-facebook

[Deprecated] Simple Facebook SDK for Android
Other
879 stars 349 forks source link

Album name #227

Open darkovski88 opened 9 years ago

darkovski88 commented 9 years ago

Hello, I love this simple facebook sdk Thanks @sromku ! Now I have an issue when I upload photos by doing this:

`final Photo photo = new Photo.Builder() .setImage(bitmap) .setName( recepie.getTitle() + "\n "

Now the issue is that the album that is created for this images that are uploading is called sromku photos. How can i change this? I've tried to do this Album album = new Album.Builder() .setName("Album name") .setMessage("Album create by #android_simple_facebook sample application") .build();

but Album.Builder() its not resolved so I cannot use it.

So someone please help!

sromku commented 9 years ago

@darkovski88 What do you mean by not resolved? You can do next thing:

  1. Create your own album on facebook
Album album = new Album.Builder()
    .setName("Your album")
    .build();

mSimpleFacebook.publish(album, onPublishListener);

In your listener onComplete() you will get albumId

  1. Publish your photo to your album:
mSimpleFacebook.publish(photo, albumId, onPublishListener);

Or, if you already has the album on facebook and you want to find out what is the albumId, then call:

mSimpleFacebook.getAlbums(onAlbumsListener)