public class SimpleFacebook
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
void |
clean()
Clean all references like Activity to prevent memory leaks
|
void |
connectDevice(Permission[] permissions,
OnConnectDeviceListener onConnectDeviceListener)
This is a new feature by facebook, that allows connecting devices and users like smart TV.
|
void |
create(Story.StoryObject storyObject,
OnCreateStoryObject onCreateStoryObject)
Create open graph object on facebook side.
|
void |
deleteRequest(java.lang.String inRequestId,
OnDeleteListener onDeleteListener)
Deletes an apprequest.
|
<T> void |
get(java.lang.String entityId,
java.lang.String edge,
android.os.Bundle bundle,
OnActionListener<T> onActionListener)
General GET method.
|
AccessToken |
getAccessToken()
Get the current access token
|
void |
getAccounts(OnAccountsListener onAccountsListener)
The pages of which the current user is an admin.
|
void |
getAlbum(java.lang.String albumId,
OnAlbumListener onAlbumListener)
Get album by album id.
|
void |
getAlbums(OnAlbumsListener onAlbumsListener)
|
void |
getAlbums(java.lang.String entityId,
OnAlbumsListener onAlbumsListener)
Get albums of entity.
|
void |
getAppRequests(OnAppRequestsListener onAppRequestsListener)
Get all app requests made by me to others or by others to me.
|
void |
getAttachment(java.lang.String entityId,
OnAttachmentListener onAttachmentListener)
Get attachment of specific entity.
|
void |
getBooks(OnPagesListener onPagesListener)
Get my books.
|
void |
getBooks(Page.Properties properties,
OnPagesListener onPagesListener)
Get my books and set the properties you need.
|
void |
getBooks(java.lang.String entityId,
OnPagesListener onPagesListener)
Get books of entity.
|
void |
getBooks(java.lang.String entityId,
Page.Properties properties,
OnPagesListener onPagesListener)
Get books of entity and set properties that you need.
|
void |
getComment(java.lang.String commentId,
OnCommentListener onCommentListener)
Get comment by comment id.
|
void |
getComments(java.lang.String entityId,
OnCommentsListener onCommentsListener)
Get comments of specific entity.
The entity can be one of: - Album. |
static SimpleFacebookConfiguration |
getConfiguration()
Get configuration
|
void |
getEvents(Event.EventDecision eventDecision,
OnEventsListener onEventsListener)
Get events of the user.
|
void |
getEvents(java.lang.String entityId,
Event.EventDecision eventDecision,
OnEventsListener onEventsListener)
Get events of specific entity.
The entity can be one of: - Profile. |
void |
getFamily(OnFamilyListener onFamilyListener)
Get person's family relationships.
The result will be id + name of other user and the relationship between you two. |
void |
getFamily(java.lang.String entityId,
OnFamilyListener onFamilyListener)
Get family relationships of entity.
The entity can be only: - Profile. |
void |
getFriends(OnFriendsListener onFriendsListener)
Get person's friends from facebook.
This method will return profile with next default properties depends on permissions you have: id, name |
void |
getFriends(Profile.Properties properties,
OnFriendsListener onFriendsListener)
Get my friends from facebook by mentioning specific parameters.
|
void |
getGames(OnPagesListener onPagesListener)
Get my games.
|
void |
getGames(Page.Properties properties,
OnPagesListener onPagesListener)
Get my games and set the properties you need.
|
void |
getGames(java.lang.String entityId,
OnPagesListener onPagesListener)
Get games of entity.
|
void |
getGames(java.lang.String entityId,
Page.Properties properties,
OnPagesListener onPagesListener)
Get games that entity like and set properties that you need.
|
java.util.Set<java.lang.String> |
getGrantedPermissions()
Get the list of all granted permissions.
|
void |
getGroups(OnGroupsListener onGroupsListener)
|
void |
getGroups(java.lang.String entityId,
OnGroupsListener onGroupsListener)
Get groups that user belongs to.
The entity can be: - Profile. |
static SimpleFacebook |
getInstance()
Get the instance of
SimpleFacebook. |
static SimpleFacebook |
getInstance(android.app.Activity activity)
Get the instance of
SimpleFacebook. |
void |
getInvitableFriends(OnFriendsListener onFriendsListener) |
void |
getInvitableFriends(Profile.Properties properties,
OnFriendsListener onFriendsListener) |
void |
getLikes(java.lang.String entityId,
OnLikesListener onLikesListener)
Get likes of specific entity.
The entity can be one of: - Album. |
void |
getMovies(OnPagesListener onPagesListener)
Get my movies.
|
void |
getMovies(Page.Properties properties,
OnPagesListener onPagesListener)
Get my movies and set the properties you need.
|
void |
getMovies(java.lang.String entityId,
OnPagesListener onPagesListener)
Get movies of entity.
|
void |
getMovies(java.lang.String entityId,
Page.Properties properties,
OnPagesListener onPagesListener)
Get movies that entity like and set properties that you need.
|
void |
getMusic(OnPagesListener onPagesListener)
Get my music.
|
void |
getMusic(Page.Properties properties,
OnPagesListener onPagesListener)
Get my music and set the properties you need.
|
void |
getMusic(java.lang.String entityId,
OnPagesListener onPagesListener)
Get music of entity.
|
void |
getMusic(java.lang.String entityId,
Page.Properties properties,
OnPagesListener onPagesListener)
Get musics that entity like and set properties that you need.
|
void |
getNotifications(OnNotificationsListener onNotificationsListener)
|
void |
getPage(java.lang.String entityId,
OnPageListener onPageListener)
Get page by page id.
|
void |
getPage(java.lang.String entityId,
Page.Properties properties,
OnPageListener onPageListener)
Get page by page id.
|
void |
getPages(OnPagesListener onPagesListener)
Get pages that user liked
|
void |
getPhoto(java.lang.String entityId,
OnPhotoListener onPhotoListener)
Get an individual photo.
|
void |
getPhotos(OnPhotosListener onPhotosListener)
Get my photos.
|
void |
getPhotos(java.lang.String entityId,
OnPhotosListener onPhotosListener)
Get photos of specific entity.
The entity can be one of: - Album. |
void |
getPosts(OnPostsListener onPostsListener)
Get all my feeds on the wall.
|
void |
getPosts(Post.PostType postType,
OnPostsListener onPostsListener)
Get my posts filtered by
Post.PostType.Permission: No special permissions are needed for getting the public posts. |
void |
getPosts(java.lang.String entityId,
OnPostsListener onPostsListener)
Get all feeds on the wall of specific entity.
|
void |
getPosts(java.lang.String entityId,
Post.PostType postType,
OnPostsListener onPostsListener)
|
void |
getProfile(OnProfileListener onProfileListener)
Get my profile from facebook.
This method will return profile with next default properties depends on permissions you have: id, name, first_name, middle_name, last_name, gender, locale, languages, link, username, timezone, updated_time, verified, bio, birthday, education, email, hometown, location, political, favorite_athletes, favorite_teams, quotes, relationship_status, religion, website, work |
void |
getProfile(Profile.Properties properties,
OnProfileListener onProfileListener)
Get my profile from facebook by mentioning specific parameters.
|
void |
getProfile(java.lang.String profileId,
OnProfileListener onProfileListener)
Get profile by profile id.
|
void |
getProfile(java.lang.String profileId,
Profile.Properties properties,
OnProfileListener onProfileListener)
Get profile by profile id and mentioning specific parameters.
|
void |
getScores(OnScoresListener onScoresListener)
Gets scores using Scores API for games.
|
void |
getStoryObjects(java.lang.String objectName,
OnStoryObjectsListener onStoryObjectsListener)
Get open graph objects that are stored on facebook side.
|
void |
getTaggableFriends(OnFriendsListener onFriendsListener) |
void |
getTaggableFriends(Profile.Properties properties,
OnFriendsListener onFriendsListener) |
void |
getTaggedPlaces(OnTaggedPlacesListener onTaggedPlacesListener) |
void |
getTelevision(OnPagesListener onPagesListener)
Get my TV shows.
|
void |
getTelevision(Page.Properties properties,
OnPagesListener onPagesListener)
Get my TV shows and set the properties you need.
|
void |
getTelevision(java.lang.String entityId,
OnPagesListener onPagesListener)
Get TV shows of entity.
|
void |
getTelevision(java.lang.String entityId,
Page.Properties properties,
OnPagesListener onPagesListener)
Get TV shows of entity and set properties that you need.
|
java.lang.String |
getToken()
Get string access token
|
void |
getVideos(OnVideosListener onVideosListener)
|
void |
getVideos(java.lang.String entityId,
OnVideosListener onVideosListener)
Get videos of specific entity.
The entity can be one of: - Event. |
static void |
initialize(android.app.Activity activity)
Initialize the library and pass an
Activity. |
void |
invite(java.lang.String[] suggestedFriends,
java.lang.String message,
OnInviteListener onInviteListener,
java.lang.String data)
Open invite dialog and invite several specific friends
|
void |
invite(java.lang.String message,
OnInviteListener onInviteListener,
java.lang.String data)
Open invite dialog and can add multiple friends
|
void |
invite(java.lang.String to,
java.lang.String message,
OnInviteListener onInviteListener,
java.lang.String data)
Open invite dialog and invite only specific friend
|
boolean |
isAllPermissionsGranted() |
boolean |
isLogin()
Are we logged in to facebook
|
void |
login(OnLoginListener onLoginListener)
Login to Facebook
|
void |
logout(OnLogoutListener onLogoutListener)
Logout from Facebook
|
void |
onActivityResult(int requestCode,
int resultCode,
android.content.Intent data)
Call this inside your activity in
Activity.onActivityResult(int, int, android.content.Intent)
method |
void |
pollDeviceAuthorization(java.lang.String authorizationCode,
OnAuthorizationDeviceListener onAuthorizationDeviceListener)
This is a new feature by facebook, that allows connecting devices and users like smart TV.
|
void |
publish(Album album,
OnPublishListener onPublishListener)
Create new album.
Permission: Permission.PUBLISH_ACTIONImportant: Make sure has Permission.USER_PHOTOS permissionbefore use this function. |
void |
publish(Feed feed,
boolean withDialog,
OnPublishListener onPublishListener)
Share to feed by using dialog or do it silently without dialog.
|
void |
publish(Feed feed,
OnPublishListener onPublishListener)
|
void |
publish(java.util.List<Photo> photos,
OnPublishListener onPublishListener)
Publish up to 6 photos to user timeline WITH DIALOG ONLY
|
void |
publish(Photo photo,
boolean withDialog,
OnPublishListener onPublishListener)
Publish photo to application default album.
Permission: Permission#PUBLISH_STREAM Important: - The album should not be full (Max: 200 photos). |
void |
publish(Photo photo,
java.lang.String albumId,
OnPublishListener onPublishListener)
Publish photo to specific album.
|
void |
publish(Score score,
OnPublishListener onPublishListener)
Posts a score using Scores API for games.
|
void |
publish(Story story,
boolean withDialog,
OnPublishListener onPublishListener)
|
void |
publish(Story story,
OnPublishListener onPublishListener)
|
void |
publish(java.lang.String entityId,
Comment comment,
OnPublishListener onPublishListener)
Publish comment
|
void |
publish(java.lang.String entityId,
Feed feed,
OnPublishListener onPublishListener)
|
void |
publish(java.lang.String entityId,
Like like,
OnPublishListener onPublishListener)
Publish like
|
void |
publish(java.lang.String entityId,
Publishable publishable,
OnPublishListener onPublishListener)
Publish any publishable entity to target (entity)
|
void |
publish(Video video,
OnPublishListener onPublishListener)
Publish video to "Videos" album.
|
void |
requestNewPermissions(Permission[] permissions,
OnNewPermissionsListener onNewPermissionsListener)
Requests any new permission in a runtime.
|
static void |
setConfiguration(SimpleFacebookConfiguration configuration)
Set facebook configuration.
|
public static void initialize(android.app.Activity activity)
Activity. This kind of
initialization is good in case you have a one base activity and many
fragments. In this case you just initialize this library and then just
get an instance of this library by getInstance()
in any other place.activity - Activitypublic static SimpleFacebook getInstance(android.app.Activity activity)
SimpleFacebook. This method, not only returns
a singleton instance of SimpleFacebook but also updates the
current activity with the passed activity. Activity in your application. And
more than one activity do something with facebook. Then, call this method
in Activity.onResume() method
@Override
protected void onResume() {
super.onResume();
mSimpleFacebook = SimpleFacebook.getInstance(this);
}
activity - SimpleFacebook instancepublic static SimpleFacebook getInstance()
SimpleFacebook. initialize(android.app.Activity) or by getInstance(android.app.Activity)SimpleFacebook instancepublic static void setConfiguration(SimpleFacebookConfiguration configuration)
configuration - The configuration of this librarypublic static SimpleFacebookConfiguration getConfiguration()
public void login(OnLoginListener onLoginListener)
onLoginListener - public void logout(OnLogoutListener onLogoutListener)
public boolean isLogin()
True if we have active and open session to facebookpublic <T> void get(java.lang.String entityId,
java.lang.String edge,
android.os.Bundle bundle,
OnActionListener<T> onActionListener)
entityId - The id of the entity you want to retrieve.edge - The graph edge. Like "friends", "groups" ...bundle - The 'get' parametersonActionListener - The listener with the type you expect as response.public void getAccounts(OnAccountsListener onAccountsListener)
onAccountsListener - public void getAlbum(java.lang.String albumId,
OnAlbumListener onAlbumListener)
albumId - The album id.onAlbumListener - The callback listener.public void getAlbums(OnAlbumsListener onAlbumsListener)
onAlbumsListener - The callback listenerpublic void getAlbums(java.lang.String entityId,
OnAlbumsListener onAlbumsListener)
Profile.getId()Page.getId()Permission.USER_PHOTOSentityId - profile id or page id.onAlbumsListener - The callback listener.public void getAppRequests(OnAppRequestsListener onAppRequestsListener)
onAppRequestsListener - The callback listener.public void getAttachment(java.lang.String entityId,
OnAttachmentListener onAttachmentListener)
onAttachmentListener - The callback listener.public void getBooks(OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getBooks(Page.Properties properties, OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getBooks(java.lang.String entityId,
OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getBooks(java.lang.String entityId,
Page.Properties properties,
OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getComment(java.lang.String commentId,
OnCommentListener onCommentListener)
commentId - The comment id.onCommentListener - The callback listener.public void getComments(java.lang.String entityId,
OnCommentsListener onCommentsListener)
Album.getId()Checkin.getId()Comment.getId() Photo.getId() Post.getId() Video.getId() Permission.USER_PHOTOS for getting
the comments of this album.entityId - Album, Checkin, Comment, Link, Photo, Post or Video.onCommentsListener - The callback listener.public void getEvents(Event.EventDecision eventDecision, OnEventsListener onEventsListener)
Permission.USER_EVENTSeventDecision - The type of event: attending, maybe, declined.onEventsListener - The callback listener.public void getEvents(java.lang.String entityId,
Event.EventDecision eventDecision,
OnEventsListener onEventsListener)
Profile.getId()Page.getId()Group.getId()Permission.USER_EVENTSentityId - Profile, Page or Group.eventDecision - The type of event: attending, maybe, declined.onEventsListener - The callback listener.public void getFamily(OnFamilyListener onFamilyListener)
Permission.USER_RELATIONSHIPSonFamilyListener - public void getFamily(java.lang.String entityId,
OnFamilyListener onFamilyListener)
Profile.getId()Permission.USER_RELATIONSHIPSentityId - onFamilyListener - public void getFriends(OnFriendsListener onFriendsListener)
onFriendsListener - The callback listener.public void getFriends(Profile.Properties properties, OnFriendsListener onFriendsListener)
onFriendsListener - The callback listener.properties - The Profile.Properties. Profile.Properties instance use:
// define the friend picture we want to get PictureAttributes pictureAttributes = Attributes.createPictureAttributes(); pictureAttributes.setType(PictureType.SQUARE); pictureAttributes.setHeight(500); pictureAttributes.setWidth(500); // create properties Properties properties = new Properties.Builder().add(Properties.ID).add(Properties.LAST_NAME).add(Properties.PICTURE, attributes).add(Properties.BIRTHDAY).build();
public void getTaggableFriends(OnFriendsListener onFriendsListener)
public void getTaggableFriends(Profile.Properties properties, OnFriendsListener onFriendsListener)
public void getInvitableFriends(OnFriendsListener onFriendsListener)
public void getInvitableFriends(Profile.Properties properties, OnFriendsListener onFriendsListener)
public void getTaggedPlaces(OnTaggedPlacesListener onTaggedPlacesListener)
public void getGames(OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getGames(Page.Properties properties, OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getGames(java.lang.String entityId,
OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getGames(java.lang.String entityId,
Page.Properties properties,
OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getGroups(OnGroupsListener onGroupsListener)
onGroupsListener - The callback listener.public void getGroups(java.lang.String entityId,
OnGroupsListener onGroupsListener)
Profile.getId()Permission.USER_GROUPSentityId - ProfileonGroupsListener - The callback listener.public void getLikes(java.lang.String entityId,
OnLikesListener onLikesListener)
Album.getId()Checkin.getId()Comment.getId() Photo.getId() Post.getId() Video.getId() Permission.USER_PHOTOS for getting
likes of this album.entityId - Album, Checkin, Comment, Link, Photo, Post or Video.onLikesListener - The callback listener.public void getMovies(OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getMovies(Page.Properties properties, OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getMovies(java.lang.String entityId,
OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getMovies(java.lang.String entityId,
Page.Properties properties,
OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getMusic(OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getMusic(Page.Properties properties, OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getMusic(java.lang.String entityId,
OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getMusic(java.lang.String entityId,
Page.Properties properties,
OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getNotifications(OnNotificationsListener onNotificationsListener)
onNotificationsListener - The callback listenerpublic void getPage(java.lang.String entityId,
OnPageListener onPageListener)
entityId - The page id.onPageListener - The callback listener.public void getPage(java.lang.String entityId,
Page.Properties properties,
OnPageListener onPageListener)
entityId - The page id.properties - Properties you want to get.onPageListener - The callback listener.public void getPages(OnPagesListener onPagesListener)
onPagesListener - The callback listener.public void getPhoto(java.lang.String entityId,
OnPhotoListener onPhotoListener)
Permission.USER_PHOTOSentityId - Photo-id.onPhotoListener - The callback listener.public void getPhotos(OnPhotosListener onPhotosListener)
Permission.USER_PHOTOSonPhotosListener - The callback listener.public void getPhotos(java.lang.String entityId,
OnPhotosListener onPhotosListener)
Album.getId()Event.getId()Page.getId() Profile.getId() Permission.USER_PHOTOSentityId - Album, Event, Page, ProfileonPhotosListener - The callback listener.public void getProfile(OnProfileListener onProfileListener)
onProfileListener - The callback listener.public void getProfile(java.lang.String profileId,
OnProfileListener onProfileListener)
#getProfile(String, Properties, OnProfileListener)profileId - The id of the profile we want to getonProfileListener - The callback listener.public void getProfile(Profile.Properties properties, OnProfileListener onProfileListener)
onProfileListener - The callback listener.properties - The Profile.Properties. Profile.Properties instance use:
// define the profile picture we want to get PictureAttributes pictureAttributes = Attributes.createPictureAttributes(); pictureAttributes.setType(PictureType.SQUARE); pictureAttributes.setHeight(500); pictureAttributes.setWidth(500); // create properties Properties properties = new Properties.Builder().add(Properties.ID).add(Properties.FIRST_NAME).add(Properties.PICTURE, attributes).build();
public void getProfile(java.lang.String profileId,
Profile.Properties properties,
OnProfileListener onProfileListener)
profileId - The id of the profile we want to getonProfileListener - The callback listener.properties - The Profile.Properties. Profile.Properties instance use:
// define the profile picture we want to get PictureAttributes pictureAttributes = Attributes.createPictureAttributes(); pictureAttributes.setType(PictureType.SQUARE); pictureAttributes.setHeight(500); pictureAttributes.setWidth(500); // create properties Properties properties = new Properties.Builder().add(Properties.ID).add(Properties.FIRST_NAME).add(Properties.PICTURE, attributes).build();
public void getPosts(OnPostsListener onPostsListener)
Permission.READ_STREAMonPostsListener - The callback listener.public void getPosts(Post.PostType postType, OnPostsListener onPostsListener)
Post.PostType.Permission.READ_STREAMpostType - Filter all wall feeds and get posts that you need.onPostsListener - The callback listener.public void getPosts(java.lang.String entityId,
OnPostsListener onPostsListener)
Group.getId()Event.getId()Page.getId() Profile.getId() Permission.READ_STREAMentityId - Event, Group, Page, ProfileonPostsListener - The callback listener.public void getPosts(java.lang.String entityId,
Post.PostType postType,
OnPostsListener onPostsListener)
Post.PostType.
Post.PostType.ALL
the entity can be one of:Group.getId()Event.getId()Page.getId() Profile.getId()
Post.PostType.LINKS
Post.PostType.POSTS
Post.PostType.STATUSES
Post.PostType.TAGGED
the entity can be one of:Page.getId() Profile.getId() Permission.READ_STREAMentityId - Event, Group, Page, ProfilepostType - Filter all wall feeds and get posts that you need.onPostsListener - The callback listener.public void getScores(OnScoresListener onScoresListener)
onScoresListener - The callback listener.public void getStoryObjects(java.lang.String objectName,
OnStoryObjectsListener onStoryObjectsListener)
objectName - onStoryObjectsListener - public void getTelevision(OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getTelevision(Page.Properties properties, OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getTelevision(java.lang.String entityId,
OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getTelevision(java.lang.String entityId,
Page.Properties properties,
OnPagesListener onPagesListener)
Permission.USER_LIKESpublic void getVideos(OnVideosListener onVideosListener)
onVideosListener - The callback listener.public void getVideos(java.lang.String entityId,
OnVideosListener onVideosListener)
Event.getId()Page.getId() Profile.getId() Permission.USER_VIDEOSentityId - Profile, Page, EventonVideosListener - The callback listener.public void publish(java.lang.String entityId,
Comment comment,
OnPublishListener onPublishListener)
entityId - comment - onPublishListener - public void publish(java.lang.String entityId,
Like like,
OnPublishListener onPublishListener)
entityId - like - onPublishListener - public void publish(Score score, OnPublishListener onPublishListener)
Permission.PUBLISH_ACTIONscore - Score to be posted. intonPublishListener - The listener for posting scorepublic void publish(java.lang.String entityId,
Feed feed,
OnPublishListener onPublishListener)
Feed on the wall of entity.Group.getId()Event.getId()Page.getId() Permission.PUBLISH_ACTION
Permission.MANAGE_PAGES
permission in addition to Permission.PUBLISH_ACTION.entityId - Group, Event, Pagefeed - The feed to publish. Use Feed.Builder to create a new
FeedonPublishListener - The listener for publishing actionpublic void publish(Feed feed, OnPublishListener onPublishListener)
feed - The feed to publish. Use Feed.Builder to create a new
FeedonPublishListener - The listener for publishing actionpublic void publish(Feed feed, boolean withDialog, OnPublishListener onPublishListener)
Permission.PUBLISH_ACTION since user does the share by himself.withDialog=true the default implementation will
try to use a native facebook dialog. If option of native dialog will not
succeed, then a web facebook dialog will be used.And in your string.xml add your app_id. For example:<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id" />
<string name="app_id">625994234086470</string>
feed - The feed to postwithDialog - Set True if you want to use dialog.onPublishListener - public void publish(Story story, OnPublishListener onPublishListener)
story - onPublishListener - public void publish(Story story, boolean withDialog, OnPublishListener onPublishListener)
story - onPublishListener - public void publish(Album album, OnPublishListener onPublishListener)
Permission.PUBLISH_ACTIONPermission.USER_PHOTOS permissionalbum - The album to createonPublishListener - The callback listenerpublic void publish(Photo photo, java.lang.String albumId, OnPublishListener onPublishListener)
Album.getCount()Album.getPrivacy()photo - The photo to uploadalbumId - The album to which the photo should be uploadedonPublishListener - The callback listenerpublic void publish(Photo photo, boolean withDialog, OnPublishListener onPublishListener)
Album.getCount()Album.getPrivacy()photo - The photo to uploadonPublishListener - The callback listenerpublic void publish(java.util.List<Photo> photos, OnPublishListener onPublishListener)
photos - onPublishListener - public void publish(Video video, OnPublishListener onPublishListener)
video - The video to uploadonPublishListener - The callback listenerpublic void publish(java.lang.String entityId,
Publishable publishable,
OnPublishListener onPublishListener)
entityId - publishable - onPublishListener - public void invite(java.lang.String message,
OnInviteListener onInviteListener,
java.lang.String data)
message - (Optional) The message inside the dialog. It could be
nulldata - (Optional) The data you want to send within the request. It
could be nullonInviteListener - The listener. It could be nullpublic void invite(java.lang.String to,
java.lang.String message,
OnInviteListener onInviteListener,
java.lang.String data)
to - The id of the friend profilemessage - The message inside the dialog. It could be nulldata - (Optional) The data you want to send within the request. It
could be nullonInviteListener - The listener. It could be nullpublic void invite(java.lang.String[] suggestedFriends,
java.lang.String message,
OnInviteListener onInviteListener,
java.lang.String data)
suggestedFriends - The ids of friends' profilesmessage - The message inside the dialog. It could be nulldata - (Optional) The data you want to send within the request. It
could be nullonInviteListener - The error listener. It could be nullpublic void create(Story.StoryObject storyObject, OnCreateStoryObject onCreateStoryObject)
public void deleteRequest(java.lang.String inRequestId,
OnDeleteListener onDeleteListener)
inRequestId - Input request id to be deleted. Note that it should have the
form {USERID}_{REQUESTID} StringonDeleteListener - The listener for deletion actionpublic void requestNewPermissions(Permission[] permissions, OnNewPermissionsListener onNewPermissionsListener)
permissions - New permissions you want to have. This array can include READ
and PUBLISH permissions in the same time. Just ask what you
need.onNewPermissionsListener - The listener for the requesting new permission action.public java.util.Set<java.lang.String> getGrantedPermissions()
Permission.fromValue(String) to get the Permission
object from string in this list.public boolean isAllPermissionsGranted()
True if all permissions were granted by the user,
otherwise return Falsepublic void connectDevice(Permission[] permissions, OnConnectDeviceListener onConnectDeviceListener)
public void pollDeviceAuthorization(java.lang.String authorizationCode,
OnAuthorizationDeviceListener onAuthorizationDeviceListener)
public AccessToken getAccessToken()
public java.lang.String getToken()
public void onActivityResult(int requestCode,
int resultCode,
android.content.Intent data)
Activity.onActivityResult(int, int, android.content.Intent)
methodrequestCode - resultCode - data - public void clean()