sromku / android-simple-facebook

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

Login-> session doesn't clear with native facebook app #424

Open pastafarianGit opened 8 years ago

pastafarianGit commented 8 years ago

I need this library to:

  1. post two pictures on facebook from my app.
  2. change facebook account inside my app.

Problem is, to post more than one picture you need to use "Publish photos with dialog: List photos = ... mSimpleFacebook.publish(photos, onPublishListener);" and that only supports with using FB dialog.

If I do it this way. I can't change facebook account since it is saved in original facebook app. And if I want to do it without dialog, I can post only one picture.

Any help is much appreciated.

pastafarianGit commented 8 years ago

made it work wih fb sdk and without native fb app installed.

private void postPhotos() {

ArrayList photos = new ArrayList<>();

SharePhoto sharePhoto1 = new SharePhoto.Builder().setBitmap(image1).build();

SharePhoto sharePhoto = new SharePhoto.Builder().setBitmap(image).build();

photos.add(sharePhoto);
photos.add(sharePhoto1);

SharePhotoContent sharePhotoContent =
        new SharePhotoContent.Builder().setPhotos(photos).build();
ShareApi.share(sharePhotoContent, shareCallback);

}