Skip to content

Tadas44/fb-photo-picker

Repository files navigation

fb-photo-picker

Facebook photo picker. This library contains RxFacebookPhoto picker with RxFacebookLogin. Purpose for this library is easy facebook login, facebook photo selection, albums browsing.

Version v0.9.x

  • Login to facebook
  • Show albums option (Optional, can show all photos)
  • Autologin feature (No existing facebook session is needed, to pick photos)

Getting started

Import dependencies

	dependencies {
	        compile 'com.github.Tadas44:fb-photo-picker:x.x.x'
	}

On your activity implement onActivityResult method

    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        RxActivityResults.getInstance().onActivityResult(requestCode, resultCode, data);
    }

To login just use RxFacebookLogin

    public Single<LoginResult> login(){
        return RxFacebookLogin.using(activity)
                .setPermissions(Permissions.USER_PHOTOS)
                .login();
    }

To pick image just use RxFacebookPhotoPicker

    @Override
    public Single<FbPhoto> pickImage() {
        return RxFacebookPhotoPicker.using(activity)
                .setAutologin(true)
                .setShowAlbums(true)
                .pickPhoto();
    }

Screenshots

Albums Photos

LICENSE

Copyright (c) 2017-present, Tadas Valaitis.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Facebook photo picker

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages