|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.fb4j.FacebookSession
public class FacebookSession
Main entry point and common interface to Facebook REST interface functionality. Encapsulates and requires a Facebook session key, thus all functionality here is accessible to logged-in users only. This class is generally not instantiated directly. Depending on the type of application, an instance may be obtained as follows: TODO G: doc: CanvasRequest.getSession, DesktopApplication.createSession, etc. TODO G: method to check if session is expired?
| Constructor Summary | |
|---|---|
FacebookSession(java.lang.String apiKey,
java.lang.String secretKey,
java.lang.String sessionKey)
|
|
FacebookSession(java.lang.String apiKey,
java.lang.String secretKey,
java.lang.String sessionKey,
long loggedInUserId)
|
|
| Method Summary | |
|---|---|
boolean |
addPhotoTags(PhotoTag... photoTags)
|
boolean |
clearStatus()
|
long |
createMarketplaceListing(Listing listing,
boolean showOnProfile)
facebook.marketplace.createListing |
PhotoAlbum |
createPhotoAlbum(PhotoAlbum album)
|
FacebookObject<? extends java.lang.Enum<? extends FacebookField>>[] |
executeQuery(java.lang.String fql)
|
Listing[] |
findMarketplaceListings(java.lang.String category,
java.lang.String subcategory,
java.lang.String queryString)
|
long[] |
getAppUserFriendIds()
|
Event |
getEvent(long eventId)
|
EventMembersByStatus |
getEventMembers(long eventId)
|
Event[] |
getEvents()
|
Event[] |
getEvents(long... eventIds)
|
Event[] |
getEvents(long userId,
long[] eventIds,
long startTime,
long endTime,
EventMembersByStatus.RsvpStatus rsvpStatus)
|
long[] |
getFriendIds()
|
Group |
getGroup(long groupId)
|
GroupMembersByRole |
getGroupMembers(long groupId)
|
Group[] |
getGroups(long userId,
long... groupIds)
|
java.lang.String[] |
getMarketplaceCategories()
|
Listing |
getMarketplaceListing(long listingId)
|
Listing[] |
getMarketplaceListings(long... listingIds)
|
Listing[] |
getMarketplaceListings(long[] listingIds,
long[] userIds)
|
Listing[] |
getMarketplaceListingsByUser()
|
Listing[] |
getMarketplaceListingsByUsers(long... userIds)
|
java.lang.String[] |
getMarketplaceSubcategories(java.lang.String category)
|
OutstandingNotifications |
getOutstandingNotifications()
notifications.get |
Page[] |
getPageInfo(long[] pageIds,
long userId,
java.lang.String type,
Page.Field... fields)
|
Page[] |
getPageInfo(long[] pageIds,
Page.Field... fields)
|
Page |
getPageInfo(long pageId,
Page.Field... fields)
|
Page[] |
getPageInfo(Page.Field... fields)
|
PhotoAlbum |
getPhotoAlbum(long albumId)
|
PhotoAlbum[] |
getPhotoAlbums(long... albumIds)
|
PhotoAlbum[] |
getPhotoAlbums(long userId,
long[] albumIds)
|
PhotoAlbum[] |
getPhotoAlbumsByUser()
|
PhotoAlbum[] |
getPhotoAlbumsByUser(long userId)
|
Photo |
getPhotoById(long photoId)
|
Photo[] |
getPhotos(long subjectId,
long albumId,
long... photoIds)
|
Photo[] |
getPhotosByAlbum(long albumId)
|
Photo[] |
getPhotosById(long... photoIds)
|
Photo[] |
getPhotosOfUser()
|
Photo[] |
getPhotosOfUser(long userId)
|
PhotoTag[] |
getPhotoTags(long... photoIds)
|
java.lang.String |
getProfileFbml()
|
java.lang.String |
getProfileFbml(long userId)
|
Relationship[] |
getRelationship(long[] userIds1,
long[] userIds2)
|
java.lang.String |
getSessionKey()
|
java.lang.String |
getStatus()
|
java.lang.String |
getStatus(long userId)
|
long |
getUserId()
Caches logged in user ID if it is already known |
UserInfo[] |
getUserInfo(long[] userIds,
UserInfo.Field... fields)
|
UserInfo |
getUserInfo(long userId,
UserInfo.Field... fields)
|
UserInfo |
getUserInfo(UserInfo.Field... fields)
|
boolean |
hasAppPermission(ExtendedPermission extendedPermission)
Checks if the user granted the app permission to... |
boolean |
isAppAdded()
Checks whether the user has added the application to their Facebook account |
boolean |
isAppAddedToPage()
|
boolean |
isAppAddedToPage(long pageId)
|
boolean |
isPageAdmin(long pageId)
|
boolean |
isPageFan(long pageId)
|
boolean |
isPageFan(long pageId,
long userId)
|
boolean |
publishAction(FeedStory story)
|
boolean |
publishAction(FeedStoryTemplate template)
|
boolean |
publishStory(FeedStory story)
|
boolean |
refreshImgSrc(java.lang.String url)
|
boolean |
refreshRefUrl(java.lang.String url)
|
boolean |
removeMarketplaceListing(long listingId,
java.lang.String status)
facebook.marketplace.removeListing |
long[] |
sendEmail(FacebookEmail facebookEmail)
|
void |
sendNotification(java.lang.String notification,
long... toUserIds)
|
boolean |
setProfileFbml(long userId,
java.lang.String fbml)
|
boolean |
setProfileFbml(java.lang.String fbml)
|
boolean |
setRefHandle(java.lang.String handle,
java.lang.String fbml)
|
void |
setSessionTimeout(int timeout)
|
boolean |
setStatus(java.lang.String status)
|
long |
updateMarketplaceListing(Listing listing,
boolean showOnProfile)
facebook.marketplace.createListing |
Photo |
uploadPhoto(long albumId,
java.lang.String caption,
java.io.File file)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FacebookSession(java.lang.String apiKey,
java.lang.String secretKey,
java.lang.String sessionKey)
public FacebookSession(java.lang.String apiKey,
java.lang.String secretKey,
java.lang.String sessionKey,
long loggedInUserId)
| Method Detail |
|---|
public java.lang.String getSessionKey()
public void setSessionTimeout(int timeout)
public boolean refreshImgSrc(java.lang.String url)
throws FacebookClientException
FacebookClientException
public boolean refreshRefUrl(java.lang.String url)
throws FacebookClientException
FacebookClientException
public boolean setRefHandle(java.lang.String handle,
java.lang.String fbml)
throws FacebookClientException
FacebookClientException
public boolean publishStory(FeedStory story)
throws FacebookClientException
FacebookClientException
public boolean publishAction(FeedStory story)
throws FacebookClientException
FacebookClientException
public boolean publishAction(FeedStoryTemplate template)
throws FacebookClientException
FacebookClientException
public FacebookObject<? extends java.lang.Enum<? extends FacebookField>>[] executeQuery(java.lang.String fql)
throws FacebookClientException
FacebookClientException
public Relationship[] getRelationship(long[] userIds1,
long[] userIds2)
throws FacebookClientException
FacebookClientException
public long[] getFriendIds()
throws FacebookClientException
FacebookClientException
public long[] getAppUserFriendIds()
throws FacebookClientException
FacebookClientException
public OutstandingNotifications getOutstandingNotifications()
throws FacebookClientException
FacebookClientException
public void sendNotification(java.lang.String notification,
long... toUserIds)
throws FacebookClientException
FacebookClientException
public long[] sendEmail(FacebookEmail facebookEmail)
throws FacebookClientException
FacebookClientException
public boolean setProfileFbml(long userId,
java.lang.String fbml)
throws FacebookClientException
FacebookClientException
public boolean setProfileFbml(java.lang.String fbml)
throws FacebookClientException
FacebookClientException
public java.lang.String getProfileFbml(long userId)
throws FacebookClientException
FacebookClientException
public java.lang.String getProfileFbml()
throws FacebookClientException
FacebookClientException
public UserInfo[] getUserInfo(long[] userIds,
UserInfo.Field... fields)
throws FacebookClientException
FacebookClientException
public UserInfo getUserInfo(long userId,
UserInfo.Field... fields)
throws FacebookClientException
FacebookClientException
public UserInfo getUserInfo(UserInfo.Field... fields)
throws FacebookClientException
FacebookClientException
public long getUserId()
throws FacebookClientException
FacebookClientException
public java.lang.String getStatus(long userId)
throws FacebookClientException
FacebookClientException
public java.lang.String getStatus()
throws FacebookClientException
FacebookClientException
public boolean setStatus(java.lang.String status)
throws FacebookClientException
FacebookClientException
public boolean clearStatus()
throws FacebookClientException
FacebookClientException
public boolean hasAppPermission(ExtendedPermission extendedPermission)
throws java.lang.Exception
extPerm -
java.lang.Exception
public boolean isAppAdded()
throws FacebookClientException
FacebookClientException
public Event[] getEvents(long userId,
long[] eventIds,
long startTime,
long endTime,
EventMembersByStatus.RsvpStatus rsvpStatus)
throws FacebookClientException
FacebookClientException
public Event[] getEvents(long... eventIds)
throws FacebookClientException
FacebookClientException
public Event getEvent(long eventId)
throws FacebookClientException
FacebookClientException
public Event[] getEvents()
throws FacebookClientException
FacebookClientException
public EventMembersByStatus getEventMembers(long eventId)
throws FacebookClientException
FacebookClientException
public Group[] getGroups(long userId,
long... groupIds)
throws FacebookClientException
FacebookClientException
public Group getGroup(long groupId)
throws FacebookClientException
FacebookClientException
public GroupMembersByRole getGroupMembers(long groupId)
throws FacebookClientException
FacebookClientException
public boolean addPhotoTags(PhotoTag... photoTags)
throws FacebookClientException
FacebookClientException
public PhotoAlbum createPhotoAlbum(PhotoAlbum album)
throws FacebookClientException
FacebookClientException
public Photo[] getPhotos(long subjectId,
long albumId,
long... photoIds)
throws FacebookClientException
FacebookClientException
public Photo[] getPhotosById(long... photoIds)
throws FacebookClientException
FacebookClientException
public Photo getPhotoById(long photoId)
throws FacebookClientException
FacebookClientException
public Photo[] getPhotosByAlbum(long albumId)
throws FacebookClientException
FacebookClientException
public Photo[] getPhotosOfUser()
throws FacebookClientException
FacebookClientException
public Photo[] getPhotosOfUser(long userId)
throws FacebookClientException
FacebookClientException
public PhotoAlbum[] getPhotoAlbums(long userId,
long[] albumIds)
throws FacebookClientException
FacebookClientException
public PhotoAlbum[] getPhotoAlbums(long... albumIds)
throws FacebookClientException
FacebookClientException
public PhotoAlbum getPhotoAlbum(long albumId)
throws FacebookClientException
FacebookClientException
public PhotoAlbum[] getPhotoAlbumsByUser(long userId)
throws FacebookClientException
FacebookClientException
public PhotoAlbum[] getPhotoAlbumsByUser()
throws FacebookClientException
FacebookClientException
public PhotoTag[] getPhotoTags(long... photoIds)
throws FacebookClientException
FacebookClientException
public Photo uploadPhoto(long albumId,
java.lang.String caption,
java.io.File file)
throws FacebookClientException
FacebookClientException
public java.lang.String[] getMarketplaceCategories()
throws FacebookClientException
FacebookClientException
public java.lang.String[] getMarketplaceSubcategories(java.lang.String category)
throws FacebookClientException
FacebookClientException
public Listing[] getMarketplaceListingsByUser()
throws FacebookClientException
FacebookClientException
public Listing[] getMarketplaceListingsByUsers(long... userIds)
throws FacebookClientException
FacebookClientException
public Listing getMarketplaceListing(long listingId)
throws FacebookClientException
FacebookClientException
public Listing[] getMarketplaceListings(long... listingIds)
throws FacebookClientException
FacebookClientException
public Listing[] getMarketplaceListings(long[] listingIds,
long[] userIds)
throws FacebookClientException
FacebookClientException
public Listing[] findMarketplaceListings(java.lang.String category,
java.lang.String subcategory,
java.lang.String queryString)
throws FacebookClientException
FacebookClientException
public long createMarketplaceListing(Listing listing,
boolean showOnProfile)
throws FacebookClientException
FacebookClientException
public long updateMarketplaceListing(Listing listing,
boolean showOnProfile)
throws FacebookClientException
FacebookClientException
public boolean removeMarketplaceListing(long listingId,
java.lang.String status)
throws FacebookClientException
FacebookClientException
public Page[] getPageInfo(Page.Field... fields)
throws FacebookClientException
FacebookClientException
public Page getPageInfo(long pageId,
Page.Field... fields)
throws FacebookClientException
FacebookClientException
public Page[] getPageInfo(long[] pageIds,
Page.Field... fields)
throws FacebookClientException
FacebookClientException
public Page[] getPageInfo(long[] pageIds,
long userId,
java.lang.String type,
Page.Field... fields)
throws FacebookClientException
FacebookClientException
public boolean isAppAddedToPage()
throws FacebookClientException
FacebookClientException
public boolean isAppAddedToPage(long pageId)
throws FacebookClientException
FacebookClientException
public boolean isPageAdmin(long pageId)
throws FacebookClientException
FacebookClientException
public boolean isPageFan(long pageId)
throws FacebookClientException
FacebookClientException
public boolean isPageFan(long pageId,
long userId)
throws FacebookClientException
FacebookClientException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||