Skip to content

Latest commit

 

History

History
165 lines (117 loc) · 3.96 KB

README.md

File metadata and controls

165 lines (117 loc) · 3.96 KB

RxFacebook

Join the chat at https://gitter.im/yongjhih/RxFacebook

rxparse.png

Facebook in RxJava.

Usage

Login/Logout:

FacebookObservable.login(activity).subscribe();
FacebookObservable.logout(activity).subscribe();

getPhotos:

Observable<Photo> photos = FacebookObservable.getPhotos(activity);
// entity: Profile Album Event Page
Observable<Photo> photos = FacebookObservable.getPhotos(activity, entityId);

Observable<Photo> photo = FacebookObservable.getPhoto(activity, attachement);

getPosts:

Observable<Post> posts = FacebookObservable.getPosts(activity);
// entity: Profile Event Group Page
Observable<Post> posts = FacebookObservable.getPosts(activity, entityId);
// status: links, statuses, posts or tagged
Observable<Post> posts = FacebookObservable.getPosts(activity, entityId, PostType.STATUSES);

getAttachment:

Observable<Attachment> attachment = FacebookObservable.getAttachment(activity, post);
// entity: Post, ?
Observable<Attachment> attachment = FacebookObservable.getAttachment(activity, entityId);

getAccounts:

Observable<Account> accounts = FacebookObservable.getAccounts(activity);

getAlbums:

Observable<Album> albums = FacebookObservable.getAlbums(activity);
// entity: Profile Page
Observable<Album> albums = FacebookObservable.getAlbums(activity, entityId);

Observable<Album> album = FacebookObservable.getAlbum(activity, albumId);

getComments:

// entity: Album Checkin Comment Photo Post Video
Observable<Comment> comments = FacebookObservable.getComments(activity, entityId);
Observable<Comment> comment = FacebookObservable.getComments(activity, commentId);

getEvents:

Observable<Event> events = FacebookObservable.getEvents(activity, EventDecision.ATTENDING);
// entity: Profile, Page, Group
Observable<Event> events = FacebookObservable.getEvents(activity, entityId, EventDecision.ATTENDING);

getFamilyUsers:

Observable<FamilyUser> familyUsers = FacebookObservable.getFamily(activity);
Observable<FamilyUser> familyUsers = FacebookObservable.getFamily(activity, profileId);

getFriends:

Observable<Profile> friends = FacebookObservable.getFriends(activity);

getGroups:

Observable<Group> groups = FacebookObservable.getGroups(activity);
// entity: Profile
Observable<Group> groups = FacebookObservable.getGroups(activity, entityId);

getLikes:

// entity: Album Checkin Comment Photo Post Video
Observable<Like> likes = FacebookObservable.getLikes(activity, entityId);
  • -Get requests-
  • -Get books-
  • -Get games-
  • -Get movies-
  • -Get music-
  • -Get notifications-
  • -Get objects-
  • -Get page-
  • -Get scores-
  • -Get television-
  • -Get videos-

Installation

repositories {
    maven {
        url "https://jitpack.io"
    }
}

dependencies {
    compile 'com.github.yongjhih:rxfacebook:1.0.0'
}

Build

DIY:

$ git clone https://github.com/sromku/android-simple-facebook
$ cd RxFacebook
$ ./gradlew assembleDebug

Credit

Based on sromku/android-simple-facebook.

  • sromku

TODO

  • Backpressure more posts/photos/comments
  • .subscribeOn(AndroidSchedulers.mainThread()) issue

LICENSE

Copyright 2015 8tory, Inc.

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.