|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.code.facebookapi.ExtensibleClient<T>
public abstract class ExtensibleClient<T>
Base class for interacting with the Facebook Application Programming Interface (API). Most Facebook API methods map directly to function calls of this class.
Instances of FacebookRestClient should be initialized via calls to auth_createToken(), followed by auth_getSession(java.lang.String).
For continually updated
documentation, please refer to the Developer Wiki.
| Field Summary | |
|---|---|
protected java.lang.String |
_apiKey
|
protected boolean |
_isDesktop
|
protected int |
_readTimeout
|
protected java.lang.String |
_secret
|
protected java.net.URL |
_serverUrl
|
protected int |
_timeout
|
static int |
BATCH_LIMIT
|
protected boolean |
batchMode
|
protected java.lang.Boolean |
cacheAppAdded
Deprecated. |
protected java.lang.Boolean |
cacheAppUser
|
protected java.lang.Long |
cacheSessionExpires
|
protected java.lang.String |
cacheSessionKey
|
protected java.lang.String |
cacheSessionSecret
filled in when session is established only used for desktop apps |
protected java.lang.Long |
cacheUserId
|
protected static java.lang.String |
CRLF
|
static java.net.URL |
HTTPS_SERVER_URL
|
protected static javax.xml.bind.JAXBContext |
JAXB_CONTEXT
|
protected static org.apache.commons.logging.Log |
log
|
static java.lang.String |
MARKETPLACE_STATUS_DEFAULT
|
static java.lang.String |
MARKETPLACE_STATUS_NOT_SUCCESS
|
static java.lang.String |
MARKETPLACE_STATUS_SUCCESS
|
protected java.lang.String |
permissionsApiKey
|
protected static java.lang.String |
PREF
|
protected java.util.List<com.google.code.facebookapi.BatchQuery> |
queries
|
protected java.lang.String |
rawResponse
|
static java.net.URL |
SERVER_URL
|
protected static int |
UPLOAD_BUFFER_SIZE
|
| Fields inherited from interface com.google.code.facebookapi.IFacebookRestClient |
|---|
ERROR_TAG, FB_SERVER, HTTPS_SERVER_ADDR, SERVER_ADDR, TARGET_API_VERSION |
| Constructor Summary | |
|---|---|
protected |
ExtensibleClient(java.lang.String apiKey,
java.lang.String secret)
|
protected |
ExtensibleClient(java.lang.String apiKey,
java.lang.String secret,
int timeout)
|
protected |
ExtensibleClient(java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey)
|
protected |
ExtensibleClient(java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey,
int connectionTimeout)
|
protected |
ExtensibleClient(java.lang.String serverAddr,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey)
|
protected |
ExtensibleClient(java.lang.String serverAddr,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey,
int connectionTimeout)
|
protected |
ExtensibleClient(java.net.URL serverUrl,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey)
|
protected |
ExtensibleClient(java.net.URL serverUrl,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey,
int timeout)
|
protected |
ExtensibleClient(java.net.URL serverUrl,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey,
int timeout,
int readTimeout)
|
| Method Summary | |
|---|---|
protected static boolean |
addParam(java.lang.String name,
java.lang.CharSequence value,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> params)
|
protected static boolean |
addParam(java.lang.String name,
java.lang.Long value,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> params)
|
protected static boolean |
addParam(java.lang.String name,
java.lang.Object value,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> params)
|
protected static boolean |
addParamDelimitIfNotBlankEmpty(java.lang.String name,
java.lang.Iterable value,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> params)
|
protected static boolean |
addParamIfNotBlank(java.lang.String name,
java.lang.CharSequence value,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> params)
|
protected static boolean |
addParamIfNotBlank(java.lang.String name,
java.lang.Long value,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> params)
|
protected static boolean |
addParamIfNotBlankZero(java.lang.String name,
java.lang.Long value,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> params)
|
protected static boolean |
addParamSecondsIfNotBlank(java.lang.String name,
java.util.Date value,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> params)
|
int |
admin_getAllocation(AllocationType allocationType)
Get your application's current allocation of the specified type of request (i.e. |
int |
admin_getAllocation(java.lang.String allocationType)
Get your application's current allocation of the specified type of request (i.e. |
org.json.JSONObject |
admin_getAppProperties(java.util.Collection<ApplicationProperty> properties)
Deprecated. use admin_getAppPropertiesMap() instead |
ApplicationPropertySet |
admin_getAppPropertiesAsSet(java.util.EnumSet<ApplicationProperty> properties)
Gets property values previously set for an application on either the Facebook Developer application or the with the admin.setAppProperties call. |
java.util.Map<ApplicationProperty,java.lang.String> |
admin_getAppPropertiesMap(java.util.Collection<ApplicationProperty> properties)
Retrieve application properties. |
T |
admin_getDailyMetrics(java.util.Set<Metric> metrics,
java.util.Date start,
java.util.Date end)
Deprecated. |
T |
admin_getDailyMetrics(java.util.Set<Metric> metrics,
long start,
long end)
Deprecated. |
T |
admin_getMetrics(java.util.Set<Metric> metrics,
java.util.Date start,
java.util.Date end,
long period)
Retrieve metrics for the current application. |
T |
admin_getMetrics(java.util.Set<Metric> metrics,
long start,
long end,
long period)
Retrieve the daily metrics for the current application. |
int |
admin_getNotificationAllocation()
Deprecated. |
int |
admin_getRequestAllocation()
Deprecated. |
boolean |
admin_setAppProperties(ApplicationPropertySet properties)
Sets several property values for an application. |
boolean |
admin_setAppProperties(java.util.Map<ApplicationProperty,java.lang.String> properties)
Set application properties. |
T |
application_getPublicInfo(java.lang.Long applicationId,
java.lang.String applicationKey,
java.lang.String applicationCanvas)
Gets the public information about the specified application. |
T |
application_getPublicInfoByApiKey(java.lang.String applicationKey)
Gets the public information about the specified application, by API key. |
T |
application_getPublicInfoByCanvasName(java.lang.String applicationCanvas)
Gets the public information about the specified application, by canvas-page name. |
T |
application_getPublicInfoById(java.lang.Long applicationId)
Gets the public information about the specified application, by application id. |
java.lang.String |
auth_createToken()
Call this function and store the result, using it to generate the appropriate login url and then to retrieve the session information. |
boolean |
auth_expireSession()
Expires the curently active session. |
abstract java.lang.String |
auth_getSession(java.lang.String authToken)
Call this function to retrieve the session information after your user has logged in. |
long |
auth_getUserId(java.lang.String authToken)
Deprecated. please call auth_getSession(authToken), then you can call users_getLoggedInUser(), or getCacheUserId() |
java.lang.String |
auth_promoteSession()
Generate a key for the current session that can be used to authenticate client-side components. |
boolean |
auth_revokeAuthorization()
If this method is called for the logged in user, then no further API calls can be made on that user's behalf until the user decides to authorize the application again. |
T |
batch_run(java.lang.String methods,
boolean serial)
Executes a batch of queries. |
void |
beginBatch()
Starts a batch of queries. |
void |
beginPermissionsMode(java.lang.String apiKey)
Begins permissions mode, and allows the current application to begin making requests on behalf of the application associated with the specified API key. |
protected T |
callMethod(IFacebookMethod method,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> paramPairs)
Call the specified method, with the given parameters, and return a DOM tree with the results. |
protected T |
callMethod(IFacebookMethod method,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> paramPairs,
java.lang.String fileName,
java.io.InputStream fileStream)
|
protected T |
callMethod(IFacebookMethod method,
Pair<java.lang.String,java.lang.CharSequence>... paramPairs)
Call the specified method, with the given parameters, and return a DOM tree with the results. |
protected static void |
close(java.io.Closeable c)
|
int |
connect_getUnconnectedFriendsCount()
This method returns the number of friends of the current user who have accounts on your site, but have not yet connected their accounts. |
T |
connect_registerUsers(java.util.Collection<java.util.Map<java.lang.String,java.lang.String>> accounts)
This method is used to create an association between an external user account and a Facebook user account. |
T |
connect_unregisterUsers(java.util.Collection<java.lang.String> email_hashes)
This method allows a site to unregister a previously registered account (using connect.registerUsers). |
long |
data_createObject(java.lang.String objectType,
java.util.Map<java.lang.String,java.lang.String> properties)
Create object in Data Store |
void |
data_createObjectType(java.lang.String name)
An object type is like a "table" in SQL terminology, or a "class" in object-oriented programming concepts. |
void |
data_defineAssociation(java.lang.String associationName,
AssociationType associationType,
AssociationInfo associationInfo1,
AssociationInfo associationInfo2,
java.lang.String inverseName)
|
void |
data_defineObjectProperty(java.lang.String objectType,
java.lang.String propertyName,
PropertyType propertyType)
|
void |
data_deleteObject(long objectId)
Delete object in Data Store |
void |
data_deleteObjects(java.util.Collection<java.lang.Long> objectIds)
Delete multiple objects in Data Store WARNING: This method seems to fail when it comes across the first object that it can't find. |
void |
data_dropObjectType(java.lang.String objectType)
Remove a previously defined object type. |
long |
data_getAssociatedObjectCount(java.lang.String associationName,
long objectId)
Returns count of object ids that are associated with specified object. |
T |
data_getAssociationDefinition(java.lang.String name)
|
T |
data_getAssociationDefinitions()
|
T |
data_getCookies()
Get all cookies for the currently logged-in user. |
T |
data_getCookies(java.lang.Long userId)
Get all cookies for the specified user. |
T |
data_getCookies(java.lang.Long userId,
java.lang.CharSequence name)
Get a specific cookie for the specified user. |
T |
data_getCookies(java.lang.String name)
Get a specific cookie for the currently logged-in user. |
T |
data_getObject(long objectId)
|
T |
data_getObjectProperty(long objectId,
java.lang.String propertyName)
|
T |
data_getObjects(java.util.Collection<java.lang.Long> objectIds)
|
T |
data_getObjectType(java.lang.String objectType)
|
T |
data_getObjectTypes()
|
java.lang.String |
data_getUserPreference(int prefId)
Lookup a single preference value for the current user. |
T |
data_getUserPreferences()
Get a map containing all preference values set for the current user. |
void |
data_removeAssociatedObjects(java.lang.String associationName,
long objectId)
The name of this function may be misleading, but it actually removes associations between any other objects and a specified object. |
void |
data_removeAssociation(java.lang.String associationName,
long object1Id,
long object2Id)
Removes an association between two object identifiers. |
void |
data_renameAssociation(java.lang.String name,
java.lang.String newName,
java.lang.String newAlias1,
java.lang.String newAlias2)
Rename a previously defined association. |
void |
data_renameObjectProperty(java.lang.String objectType,
java.lang.String propertyName,
java.lang.String newPropertyName)
|
void |
data_renameObjectType(java.lang.String objectType,
java.lang.String newName)
|
void |
data_setAssociation(java.lang.String associationName,
long object1Id,
long object2Id,
java.lang.String data,
java.util.Date associationTime)
Create an association between two objects |
boolean |
data_setCookie(java.lang.Long userId,
java.lang.CharSequence name,
java.lang.CharSequence value)
Set a cookie for the specified user. |
boolean |
data_setCookie(java.lang.Long userId,
java.lang.CharSequence name,
java.lang.CharSequence value,
java.lang.CharSequence path)
Set a cookie for the specified user, with the specified path. |
boolean |
data_setCookie(java.lang.Long userId,
java.lang.CharSequence name,
java.lang.CharSequence value,
java.lang.Long expires)
Set a cookie for the specified user, with the specified expiration date. |
boolean |
data_setCookie(java.lang.Long userId,
java.lang.CharSequence name,
java.lang.CharSequence value,
java.lang.Long expires,
java.lang.CharSequence path)
Set a cookie for the specified user, with the specified expiration date and path. |
boolean |
data_setCookie(java.lang.String name,
java.lang.String value)
Set a cookie for the current user. |
boolean |
data_setCookie(java.lang.String name,
java.lang.String value,
java.lang.Long expires)
Set a cookie for the current user, with the specified expiration date. |
boolean |
data_setCookie(java.lang.String name,
java.lang.String value,
java.lang.Long expires,
java.lang.String path)
Set a cookie for the current user, with the specified expiration date and path. |
boolean |
data_setCookie(java.lang.String name,
java.lang.String value,
java.lang.String path)
Set a cookie for the current user, under the specified path. |
void |
data_setObjectProperty(long objectId,
java.lang.String propertyName,
java.lang.String value)
|
void |
data_setUserPreference(int prefId,
java.lang.String value)
Set a user-preference value. |
void |
data_setUserPreferences(java.util.Map<java.lang.Integer,java.lang.String> values,
boolean replace)
Set multiple user-preferences values. |
void |
data_undefineAssociation(java.lang.String name)
Remove a previously defined association. |
void |
data_undefineObjectProperty(java.lang.String objectType,
java.lang.String propertyName)
|
void |
data_updateObject(long objectId,
java.util.Map<java.lang.String,java.lang.String> properties,
boolean replace)
Update properties of an existing object in Data Store |
protected static java.lang.CharSequence |
delimit(java.util.Collection<java.util.Map.Entry<java.lang.String,java.lang.String>> entries,
java.lang.String delimiter,
java.lang.String equals,
boolean doEncode)
|
protected static void |
disconnect(java.net.HttpURLConnection conn)
|
protected java.lang.String |
encodeMethods(java.util.List<com.google.code.facebookapi.BatchQuery> queries)
|
void |
endPermissionsMode()
Terminates permissions mode. |
boolean |
events_cancel(java.lang.Long eid,
java.lang.String cancel_message)
Cancels an event. |
java.lang.Long |
events_create(java.util.Map<java.lang.String,java.lang.String> event_info)
Creates an event on behalf of the user if the application has an active session key for that user; otherwise it creates an event on behalf of the application. |
boolean |
events_edit(java.lang.Long eid,
java.util.Map<java.lang.String,java.lang.String> event_info)
Edits the details of an existing event. |
T |
events_get(java.lang.Long userId,
java.util.Collection<java.lang.Long> eventIds,
java.lang.Long startTime,
java.lang.Long endTime)
Returns all visible events according to the filters specified. |
T |
events_get(java.lang.Long userId,
java.util.Collection<java.lang.Long> eventIds,
java.lang.Long startTime,
java.lang.Long endTime,
java.lang.String rsvp_status)
Returns all visible events according to the filters specified. |
T |
events_getMembers(java.lang.Long eventId)
Retrieves the membership list of an event |
boolean |
events_rsvp(java.lang.Long eid,
java.lang.String rsvp_status)
Sets a user's RSVP status for an event. |
protected boolean |
extractBoolean(T result)
Extracts a Boolean from a result that consists of a Boolean only. |
protected abstract int |
extractInt(T result)
Extracts an Long from a result that consists of an Long only. |
protected abstract java.lang.Long |
extractLong(T result)
Extracts an Long from a result that consists of a Long only. |
protected abstract java.lang.String |
extractString(T result)
Extracts a String from a T consisting entirely of a String. |
protected abstract java.net.URL |
extractURL(T result)
Extracts a URL from a result that consists of a URL only. |
boolean |
fbml_refreshImgSrc(java.lang.String imageUrl)
Recaches the image with the specified imageUrl. |
boolean |
fbml_refreshImgSrc(java.net.URL imageUrl)
Recaches the image with the specified imageUrl. |
boolean |
fbml_refreshRefUrl(java.lang.String url)
Recaches the referenced url. |
boolean |
fbml_refreshRefUrl(java.net.URL url)
Recaches the referenced url. |
boolean |
fbml_setRefHandle(java.lang.String handle,
java.lang.String fbmlMarkup)
Associates a " handle" with FBML markup so that the handle can be used within the fb:ref FBML tag. |
boolean |
feed_deactivateTemplateBundleByID(java.lang.Long bundleId)
Deactivates the specified template bundle. |
T |
feed_getRegisteredTemplateBundleByID(java.lang.Long id)
Retrieve a template bundle by id. |
T |
feed_getRegisteredTemplateBundles()
Get a list of all registered template bundles for your application. |
boolean |
feed_publishTemplatizedAction(java.lang.CharSequence titleTemplate)
Publishes a Mini-Feed story describing an action taken by the logged-in user, and publishes aggregating News Feed stories to their friends. |
boolean |
feed_publishTemplatizedAction(java.lang.CharSequence titleTemplate,
java.lang.Long pageActorId)
Publishes a Mini-Feed story describing an action taken by the logged-in user (or, if pageActorId is provided, page), and publishes aggregating News
Feed stories to the user's friends/page's fans. |
boolean |
feed_publishTemplatizedAction(java.lang.CharSequence titleTemplate,
java.util.Map<java.lang.String,java.lang.CharSequence> titleData,
java.lang.CharSequence bodyTemplate,
java.util.Map<java.lang.String,java.lang.CharSequence> bodyData,
java.lang.CharSequence bodyGeneral,
java.util.Collection<java.lang.Long> targetIds,
java.util.Collection<? extends IPair<? extends java.lang.Object,java.net.URL>> images,
java.lang.Long pageActorId)
Publishes a Mini-Feed story describing an action taken by the logged-in user (or, if pageActorId is provided, page), and publishes aggregating News
Feed stories to the user's friends/page's fans. |
boolean |
feed_publishTemplatizedAction(java.lang.Integer actorId,
java.lang.CharSequence titleTemplate,
java.util.Map<java.lang.String,java.lang.CharSequence> titleData,
java.lang.CharSequence bodyTemplate,
java.util.Map<java.lang.String,java.lang.CharSequence> bodyData,
java.lang.CharSequence bodyGeneral,
java.util.Collection<java.lang.Long> targetIds,
java.util.Collection<? extends IPair<? extends java.lang.Object,java.net.URL>> images)
Deprecated. Use the version that takes a Long for the actorId paramter. |
boolean |
feed_publishTemplatizedAction(java.lang.Long actorId,
java.lang.CharSequence titleTemplate)
Deprecated. |
boolean |
feed_publishTemplatizedAction(java.lang.Long actorId,
java.lang.CharSequence titleTemplate,
java.util.Map<java.lang.String,java.lang.CharSequence> titleData,
java.lang.CharSequence bodyTemplate,
java.util.Map<java.lang.String,java.lang.CharSequence> bodyData,
java.lang.CharSequence bodyGeneral,
java.util.Collection<java.lang.Long> targetIds,
java.util.Collection<? extends IPair<? extends java.lang.Object,java.net.URL>> images)
Publishes a Mini-Feed story describing an action taken by a user, and publishes aggregating News Feed stories to the friends of that user. |
boolean |
feed_publishTemplatizedAction(java.lang.String titleTemplate,
java.lang.String titleData,
java.lang.String bodyTemplate,
java.lang.String bodyData,
java.lang.String bodyGeneral,
java.util.Collection<? extends IPair<? extends java.lang.Object,java.net.URL>> pictures,
java.lang.String targetIds)
Publishes a templatized action for the current user. |
boolean |
feed_PublishTemplatizedAction(TemplatizedAction action)
Publishes a templatized action for the current user. |
java.lang.Boolean |
feed_publishUserAction(java.lang.Long bundleId)
Publishes a user action to the feed. |
java.lang.Boolean |
feed_publishUserAction(java.lang.Long bundleId,
java.util.Map<java.lang.String,java.lang.String> templateData,
java.util.List<IFeedImage> images,
java.util.List<java.lang.Long> targetIds,
java.lang.String bodyGeneral,
int storySize)
Publishes a user action to the feed. |
java.lang.Boolean |
feed_publishUserAction(java.lang.Long bundleId,
java.util.Map<java.lang.String,java.lang.String> templateData,
java.util.List<java.lang.Long> targetIds,
java.lang.String bodyGeneral)
Publishes a user action to the feed. |
java.lang.Long |
feed_registerTemplateBundle(java.util.Collection<java.lang.String> templates)
Registers a feed template. |
java.lang.Long |
feed_registerTemplateBundle(java.util.Collection<java.lang.String> templates,
java.util.Collection<BundleStoryTemplate> shortTemplates,
BundleStoryTemplate longTemplate)
Registers a feed template. |
java.lang.Long |
feed_registerTemplateBundle(java.util.Collection<java.lang.String> templates,
java.util.Collection<BundleStoryTemplate> shortTemplates,
BundleStoryTemplate longTemplate,
java.util.List<BundleActionLink> actionLinks)
Registers a feed template. |
java.lang.Long |
feed_registerTemplateBundle(java.lang.String template)
Registers a feed template. |
java.lang.Long |
feed_registerTemplateBundle(java.lang.String template,
java.lang.String shortTemplate,
java.lang.String longTemplate)
Deprecated. |
T |
fql_query(java.lang.CharSequence query)
Retrieves the results of a Facebook Query Language query |
T |
friends_areFriends(java.util.Collection<java.lang.Long> userIds1,
java.util.Collection<java.lang.Long> userIds2)
Retrieves whether pairs of users are friends. |
T |
friends_areFriends(long userId1,
long userId2)
Retrieves whether two users are friends. |
T |
friends_get()
Retrieves the friends of the currently logged in user. |
T |
friends_get(java.lang.Long uid)
Retrieves the friends uid. |
T |
friends_getAppUsers()
Retrieves the friends of the currently logged in user, who are also users of the calling application. |
T |
friends_getList(java.lang.Long friendListId)
Retrieves the friends of the currently logged in user that are members of the friends list with ID friendListId. |
T |
friends_getLists()
Retrieves the friend lists of the currently logged in user. |
java.lang.Boolean |
getCacheAppAdded()
Deprecated. |
java.lang.Boolean |
getCacheAppUser()
|
java.lang.Long |
getCacheSessionExpires()
|
java.lang.String |
getCacheSessionKey()
|
java.lang.String |
getCacheSessionSecret()
|
java.lang.Long |
getCacheUserId()
|
java.net.URL |
getDefaultServerUrl()
|
javax.xml.bind.JAXBContext |
getJaxbContext()
Get the JAXB context that is being used by the client. |
java.lang.String |
getRawResponse()
Returns a string representation for the last API response recieved from Facebook, exactly as sent by the API server. |
abstract java.lang.String |
getResponseFormat()
The response format in which results to FacebookMethod calls are returned |
java.lang.Object |
getResponsePOJO()
Returns a JAXB object of the type that corresponds to the last API call made on the client. |
java.lang.String |
getSessionSecret()
Gets the session-token used by Facebook to authenticate a desktop application. |
T |
groups_get(java.lang.Long userId,
java.util.Collection<java.lang.Long> groupIds)
Retrieves the groups associated with a user |
T |
groups_getMembers(java.lang.Number groupId)
Retrieves the membership list of a group |
protected void |
handleFeedImages(java.util.List<Pair<java.lang.String,java.lang.CharSequence>> params,
java.util.Collection<? extends IPair<? extends java.lang.Object,java.net.URL>> images)
Adds image parameters |
static void |
initJaxbSupport()
|
boolean |
isDesktop()
Check to see if the client is running in desktop-app mode |
java.lang.Boolean |
liveMessage_send(java.lang.Long recipient,
java.lang.String eventName,
org.json.JSONObject message)
Sends a message using the LiveMessage API. |
java.lang.Long |
marketplace_createListing(boolean showOnProfile,
MarketListing listing)
Create a new marketplace listing. |
java.lang.Long |
marketplace_createListing(boolean showOnProfile,
MarketListing listing,
java.lang.Long userId)
Create a new marketplace listing. |
java.lang.Long |
marketplace_createListing(java.lang.Boolean showOnProfile,
MarketplaceListing attrs)
Deprecated. |
java.lang.Long |
marketplace_createListing(java.lang.Long listingId,
boolean showOnProfile,
MarketListing listing)
Create a new marketplace listing, or modify an existing one. |
java.lang.Long |
marketplace_createListing(java.lang.Long listingId,
boolean showOnProfile,
MarketListing listing,
java.lang.Long userId)
Create a new marketplace listing, or modify an existing one. |
java.lang.Long |
marketplace_createListing(java.lang.Long listingId,
boolean showOnProfile,
java.lang.String attributes)
Create a new marketplace listing, or modify an existing one. |
java.lang.Long |
marketplace_createListing(java.lang.Long listingId,
boolean showOnProfile,
java.lang.String attributes,
java.lang.Long userId)
Create a new marketplace listing, or modify an existing one. |
java.lang.Long |
marketplace_editListing(java.lang.Long listingId,
java.lang.Boolean showOnProfile,
MarketListing attrs)
Modify a marketplace listing |
java.lang.Long |
marketplace_editListing(java.lang.Long listingId,
java.lang.Boolean showOnProfile,
MarketplaceListing attrs)
Deprecated. |
java.util.List<java.lang.String> |
marketplace_getCategories()
Deprecated. |
T |
marketplace_getCategoriesObject()
Get the categories available in marketplace. |
T |
marketplace_getListings(java.util.Collection<java.lang.Long> listingIds,
java.util.Collection<java.lang.Long> userIds)
Fetch marketplace listings, filtered by listing IDs and/or the posting users' IDs. |
T |
marketplace_getSubCategories(java.lang.CharSequence category)
Get the subcategories available for a category. |
boolean |
marketplace_removeListing(java.lang.Long listingId)
Remove a marketplace listing |
boolean |
marketplace_removeListing(java.lang.Long listingId,
java.lang.CharSequence status)
Deprecated. |
boolean |
marketplace_removeListing(java.lang.Long listingId,
java.lang.Long userId)
Remove a marketplace listing. |
boolean |
marketplace_removeListing(java.lang.Long listingId,
MarketListingStatus status)
Remove a listing from the marketplace by id. |
boolean |
marketplace_removeListing(java.lang.Long listingId,
MarketListingStatus status,
java.lang.Long userId)
Remove a listing from the marketplace by id. |
T |
marketplace_search(java.lang.CharSequence category,
java.lang.CharSequence subCategory,
java.lang.CharSequence query)
Deprecated. |
protected static Pair<java.lang.String,java.lang.CharSequence> |
newPair(java.lang.String name,
boolean value)
Deprecated. |
protected static Pair<java.lang.String,java.lang.CharSequence> |
newPair(java.lang.String name,
java.lang.CharSequence value)
|
protected static Pair<java.lang.String,java.lang.CharSequence> |
newPair(java.lang.String name,
java.lang.Integer value)
|
protected static Pair<java.lang.String,java.lang.CharSequence> |
newPair(java.lang.String name,
java.lang.Long value)
|
protected static Pair<java.lang.String,java.lang.CharSequence> |
newPair(java.lang.String name,
java.lang.Object value)
|
protected static Pair<java.lang.String,java.lang.CharSequence> |
newPair10(java.lang.String name,
boolean value)
|
protected static Pair<java.lang.String,java.lang.CharSequence> |
newPairTF(java.lang.String name,
boolean value)
|
T |
notifications_get()
Retrieves the outstanding notifications for the session user. |
void |
notifications_send(java.lang.CharSequence notification)
Send a notification message to the logged-in user. |
void |
notifications_send(java.util.Collection<java.lang.Long> recipientIds,
java.lang.CharSequence notification)
Send a notification message to the specified users. |
java.net.URL |
notifications_send(java.util.Collection<java.lang.Long> recipientIds,
java.lang.CharSequence notification,
java.lang.CharSequence email)
Deprecated. |
void |
notifications_send(java.util.Collection<java.lang.Long> recipientIds,
java.lang.String notification,
boolean isAppToUser)
Sends a notification. |
java.lang.String |
notifications_sendEmail(java.util.Collection<java.lang.Long> recipients,
java.lang.CharSequence subject,
java.lang.CharSequence fbml)
Deprecated. |
T |
notifications_sendEmail(java.util.Collection<java.lang.Long> recipients,
java.lang.CharSequence subject,
java.lang.CharSequence text,
java.lang.CharSequence fbml)
Send an e-mail to a set of app-users. |
java.lang.String |
notifications_sendEmailPlain(java.util.Collection<java.lang.Long> recipients,
java.lang.CharSequence subject,
java.lang.CharSequence text)
Deprecated. |
java.lang.String |
notifications_sendEmailStr(java.util.Collection<java.lang.Long> recipients,
java.lang.CharSequence subject,
java.lang.CharSequence fbml,
java.lang.CharSequence text)
Deprecated. |
T |
notifications_sendEmailToCurrentUser(java.lang.String subject,
java.lang.String email,
java.lang.String fbml)
Send an e-mail to the currently logged-in user. |
T |
notifications_sendFbmlEmail(java.util.Collection<java.lang.Long> recipients,
java.lang.String subject,
java.lang.String fbml)
Send an e-mail to a set of app-users. |
T |
notifications_sendFbmlEmailToCurrentUser(java.lang.String subject,
java.lang.String fbml)
Send an e-mail to the currently logged-in user. |
T |
notifications_sendTextEmail(java.util.Collection<java.lang.Long> recipients,
java.lang.String subject,
java.lang.String email)
Send an e-mail to a set of app-users. |
T |
notifications_sendTextEmailToCurrentUser(java.lang.String subject,
java.lang.String email)
Send an e-mail to the currently logged-in user. |
T |
pages_getInfo(java.util.Collection<java.lang.Long> pageIds,
java.util.EnumSet<PageProfileField> fields)
Retrieves the requested profile fields for the Facebook Pages with the given pageIds. |
T |
pages_getInfo(java.util.Collection<java.lang.Long> pageIds,
java.util.Set<java.lang.CharSequence> fields)
Retrieves the requested profile fields for the Facebook Pages with the given pageIds. |
T |
pages_getInfo(java.lang.Long userId,
java.util.EnumSet<PageProfileField> fields)
Retrieves the requested profile fields for the Facebook Pages of the user with the given userId. |
T |
pages_getInfo(java.lang.Long userId,
java.util.Set<java.lang.CharSequence> fields)
Retrieves the requested profile fields for the Facebook Pages of the user with the given userId. |
boolean |
pages_isAdmin(java.lang.Long pageId)
Checks whether the logged-in user for this session is an admin of the page with the given pageId. |
boolean |
pages_isAppAdded(java.lang.Long pageId)
Checks whether a page has added the application |
boolean |
pages_isFan(java.lang.Long pageId)
Checks whether the logged-in user is a fan of the page with the given pageId. |
boolean |
pages_isFan(java.lang.Long pageId,
java.lang.Long userId)
Checks whether a user is a fan of the page with the given pageId. |
protected abstract T |
parseCallResult(java.io.InputStream data,
IFacebookMethod method)
Parses the result of an API call into a T. |
T |
permissions_checkAvailableApiAccess(java.lang.String apiKey)
Check to see what permissions have been granted to current app by the specified external application. |
T |
permissions_checkGrantedApiAccess(java.lang.String apiKey)
Check to see what permissions have been granted to specified external application by the current application. |
boolean |
permissions_grantApiAccess(java.lang.String apiKey,
java.util.Set<FacebookMethod> methods)
Grant permission to an external app to make API calls on behalf of the current application. |
boolean |
permissions_grantFullApiAccess(java.lang.String apiKey)
Grant permission to an external app to make API calls on behalf of the current application. |
boolean |
permissions_revokeApiAccess(java.lang.String apiKey)
Revokes the specified application's permission to call API methods on behalf of the current app. |
boolean |
photos_addTag(java.lang.Long photoId,
java.lang.CharSequence tagText,
java.lang.Double xPct,
java.lang.Double yPct)
Adds a tag to a photo. |
boolean |
photos_addTag(java.lang.Long photoId,
java.lang.CharSequence tagText,
java.lang.Double pct,
java.lang.Double pct2,
java.lang.Long userId)
Adds a tag to a photo. |
boolean |
photos_addTag(java.lang.Long photoId,
java.lang.Long taggedUserId,
java.lang.Double xPct,
java.lang.Double yPct)
Adds a tag to a photo. |
boolean |
photos_addTag(java.lang.Long photoId,
java.lang.Long taggedUserId,
java.lang.Double pct,
java.lang.Double pct2,
java.lang.Long userId)
Adds a tag to a photo. |
T |
photos_addTags(java.lang.Long photoId,
java.lang.Iterable<PhotoTag> tags)
Adds several tags to a photo. |
T |
photos_addTags(java.lang.Long photoId,
java.lang.Iterable<PhotoTag> tags,
java.lang.Long userId)
Adds several tags to a photo. |
T |
photos_createAlbum(java.lang.String albumName)
Creates an album. |
T |
photos_createAlbum(java.lang.String albumName,
java.lang.Long userId)
Creates an album. |
T |
photos_createAlbum(java.lang.String name,
java.lang.String description,
java.lang.String location)
Creates an album. |
T |
photos_createAlbum(java.lang.String name,
java.lang.String description,
java.lang.String location,
java.lang.Long userId)
Creates an album. |
T |
photos_get(java.lang.Iterable<java.lang.Long> photoIds)
Used to retrieve photo objects using the search parameters (one or more of the parameters must be provided). |
T |
photos_get(java.lang.Long subjId)
Used to retrieve photo objects using the search parameters (one or more of the parameters must be provided). |
T |
photos_get(java.lang.Long subjId,
java.lang.Iterable<java.lang.Long> photoIds)
Used to retrieve photo objects using the search parameters (one or more of the parameters must be provided). |
T |
photos_get(java.lang.Long subjId,
java.lang.Long albumId)
Used to retrieve photo objects using the search parameters (one or more of the parameters must be provided). |
T |
photos_get(java.lang.Long subjId,
java.lang.Long albumId,
java.lang.Iterable<java.lang.Long> photoIds)
Used to retrieve photo objects using the search parameters (one or more of the parameters must be provided). |
T |
photos_getAlbums(java.lang.Iterable<java.lang.Long> albumIds)
Retrieves album metadata for a list of album IDs. |
T |
photos_getAlbums(java.lang.Long userId)
Retrieves album metadata for albums owned by a user. |
T |
photos_getAlbums(java.lang.Long userId,
java.lang.Iterable<java.lang.Long> albumIds)
Retrieves album metadata. |
T |
photos_getByAlbum(java.lang.Long albumId)
Used to retrieve photo objects using the search parameters (one or more of the parameters must be provided). |
T |
photos_getByAlbum(java.lang.Long albumId,
java.lang.Iterable<java.lang.Long> photoIds)
Used to retrieve photo objects using the search parameters (one or more of the parameters must be provided). |
T |
photos_getTags(java.lang.Iterable<java.lang.Long> photoIds)
Retrieves the tags for the given set of photos. |
T |
photos_upload(java.io.File photo)
Uploads a photo to Facebook. |
T |
photos_upload(java.io.File photo,
java.lang.Long albumId)
Uploads a photo to Facebook. |
T |
photos_upload(java.io.File photo,
java.lang.String caption)
Uploads a photo to Facebook. |
T |
photos_upload(java.io.File photo,
java.lang.String caption,
java.lang.Long albumId)
Uploads a photo to Facebook. |
T |
photos_upload(java.lang.Long userId,
java.io.File photo)
Uploads a photo to Facebook. |
T |
photos_upload(java.lang.Long userId,
java.io.File photo,
java.lang.Long albumId)
Uploads a photo to Facebook. |
T |
photos_upload(java.lang.Long userId,
java.io.File photo,
java.lang.String caption)
Uploads a photo to Facebook. |
T |
photos_upload(java.lang.Long userId,
java.io.File photo,
java.lang.String caption,
java.lang.Long albumId)
Uploads a photo to Facebook. |
T |
photos_upload(java.lang.Long userId,
java.lang.String caption,
java.lang.Long albumId,
java.lang.String fileName,
java.io.InputStream fileStream)
Uploads a photo to Facebook. |
protected java.lang.String |
postFileRequest(IFacebookMethod method,
java.util.Map<java.lang.String,java.lang.String> params,
java.lang.String fileName,
java.io.InputStream fileStream)
Helper function for posting a request that includes raw file data, eg photos_upload(java.io.File). |
protected static void |
printDom(org.w3c.dom.Node n,
java.lang.String prefix,
java.lang.StringBuilder sb)
Prints out the DOM tree. |
T |
profile_getFBML()
Gets the FBML for the current user's profile box. |
T |
profile_getFBML(int type)
Gets the FBML for the current user's profile boxes. |
T |
profile_getFBML(int type,
java.lang.Long userId)
Gets the FBML for the user's profile boxes. |
T |
profile_getFBML(java.lang.Long userId)
Gets the FBML for the user's profile box. |
T |
profile_getInfo(java.lang.Long userId)
Get the specified user's application-info section. |
T |
profile_getInfoOptions(java.lang.String field)
Get the options associated with the specified field for an application info section. |
boolean |
profile_setFBML(java.lang.CharSequence profileFbmlMarkup,
java.lang.CharSequence profileActionFbmlMarkup)
Sets the FBML for the profile box and profile actions for the logged-in user. |
boolean |
profile_setFBML(java.lang.CharSequence profileFbmlMarkup,
java.lang.CharSequence profileActionFbmlMarkup,
java.lang.CharSequence mobileFbmlMarkup)
Sets the FBML for the profile box, profile actions, and mobile devices for the current user. |
boolean |
profile_setFBML(java.lang.CharSequence profileFbmlMarkup,
java.lang.CharSequence profileActionFbmlMarkup,
java.lang.CharSequence mobileFbmlMarkup,
java.lang.Long profileId)
Sets the FBML for the profile box, profile actions, and mobile devices for the user or page profile with ID profileId. |
boolean |
profile_setFBML(java.lang.CharSequence profileFbmlMarkup,
java.lang.CharSequence profileActionFbmlMarkup,
java.lang.Long profileId)
Sets the FBML for the profile box and profile actions for the user or page profile with ID profileId. |
boolean |
profile_setFBML(java.lang.Long userId,
java.lang.String profileFbml,
java.lang.String actionFbml,
java.lang.String mobileFbml)
|
boolean |
profile_setFBML(java.lang.Long userId,
java.lang.String profileFbml,
java.lang.String actionFbml,
java.lang.String mobileFbml,
java.lang.String profileMain)
Sets the FBML for a user's profile, including the content for both the profile box and the profile actions. |
void |
profile_setInfo(java.lang.Long userId,
java.lang.String title,
boolean textOnly,
java.util.List<ProfileInfoField> fields)
Configures an application info section that the specified user can install on the Info tab of her profile. |
void |
profile_setInfoOptions(ProfileInfoField field)
Specifies the objects for a field for an application info section. |
boolean |
profile_setMobileFBML(java.lang.CharSequence fbmlMarkup)
Sets the FBML for the logged-in user's profile on mobile devices. |
boolean |
profile_setMobileFBML(java.lang.CharSequence fbmlMarkup,
java.lang.Long profileId)
Sets the FBML for the user or page profile with ID profileId on mobile devices. |
boolean |
profile_setProfileActionFBML(java.lang.CharSequence fbmlMarkup)
Sets the FBML for profile actions for the logged-in user. |
boolean |
profile_setProfileActionFBML(java.lang.CharSequence fbmlMarkup,
java.lang.Long profileId)
Sets the FBML for profile actions for the user or page profile with ID profileId. |
boolean |
profile_setProfileFBML(java.lang.CharSequence fbmlMarkup)
Sets the FBML for a profile box on the logged-in user's profile. |
boolean |
profile_setProfileFBML(java.lang.CharSequence fbmlMarkup,
java.lang.Long profileId)
Sets the FBML for a profile box on the user or page profile with ID profileId. |
protected static java.lang.RuntimeException |
runtimeException(java.lang.Exception ex)
|
void |
setCacheAppAdded(java.lang.Boolean cacheAppAdded)
Deprecated. |
void |
setCacheAppUser(java.lang.Boolean cacheAppUser)
|
void |
setCacheSession(java.lang.String cacheSessionKey,
java.lang.Long cacheUserId,
java.lang.Long cacheSessionExpires)
|
void |
setCacheSessionExpires(java.lang.Long cacheSessionExpires)
|
void |
setCacheSessionKey(java.lang.String cacheSessionKey)
|
void |
setCacheSessionSecret(java.lang.String cacheSessionSecret)
|
void |
setCacheUserId(java.lang.Long cacheUserId)
|
void |
setDefaultServerUrl(java.net.URL newUrl)
|
void |
setIsDesktop(boolean isDesktop)
Set the client to run in desktop-app mode. |
void |
setJaxbContext(javax.xml.bind.JAXBContext context)
Set the JAXB context that the client will use. |
void |
setServerUrl(java.lang.String newUrl)
Override the default Facebook API server used for making requests. |
void |
setSessionSecret(java.lang.String key)
Allows the session-token to be manually overridden when running a desktop application. |
boolean |
sms_canSend()
Check to see if the application is permitted to send SMS messages to the current application user. |
boolean |
sms_canSend(java.lang.Long userId)
Check to see if the application is permitted to send SMS messages to the specified user. |
java.lang.Integer |
sms_send(java.lang.Long userId,
java.lang.String message,
java.lang.Integer smsSessionId,
boolean makeNewSession)
Send an SMS message to the specified user. |
java.lang.Integer |
sms_send(java.lang.String message,
java.lang.Integer smsSessionId,
boolean makeNewSession)
Send an SMS message to the current application user. |
void |
sms_sendMessage(java.lang.Long userId,
java.lang.CharSequence message)
Sends a message via SMS to the user identified by userId. |
int |
sms_sendMessageWithSession(java.lang.Long userId,
java.lang.CharSequence message)
Sends a message via SMS to the user identified by userId, with the expectation that the user will reply. |
protected boolean |
templatizedFeedHandler(java.lang.String titleTemplate,
java.lang.String titleData,
java.lang.String bodyTemplate,
java.lang.String bodyData,
java.lang.String bodyGeneral,
java.util.Collection<? extends IPair<? extends java.lang.Object,java.net.URL>> pictures,
java.lang.String targetIds,
java.lang.Long pageId)
|
protected static org.json.JSONObject |
toJson(java.util.Map<java.lang.String,java.lang.String> map)
|
protected static org.json.JSONArray |
toJsonListOfMaps(java.util.Collection<java.util.Map<java.lang.String,java.lang.String>> listOfMaps)
|
protected static org.json.JSONArray |
toJsonListOfStrings(java.util.Collection<java.lang.String> list)
|
protected static java.lang.String |
toString(java.lang.CharSequence cs)
|
boolean |
users_clearStatus()
Clears the logged-in user's Facebook status. |
T |
users_getInfo(java.lang.Iterable<java.lang.Long> userIds,
java.util.Collection<ProfileField> fields)
Retrieves the requested info fields for the requested set of users. |
T |
users_getInfo(java.lang.Iterable<java.lang.Long> userIds,
java.util.Set<java.lang.CharSequence> fields)
Retrieves the requested info fields for the requested set of users. |
long |
users_getLoggedInUser()
Retrieves the user ID of the user logged in to this API session |
T |
users_getStandardInfo(java.lang.Iterable<java.lang.Long> userIds,
java.util.Collection<ProfileField> fields)
Returns an array of user-specific information for each user identifier passed, limited by the view of the current user. |
T |
users_getStandardInfo(java.lang.Iterable<java.lang.Long> userIds,
java.util.Set<java.lang.CharSequence> fields)
Returns an array of user-specific information for each user identifier passed, limited by the view of the current user. |
boolean |
users_hasAppPermission(Permission perm)
|
boolean |
users_hasAppPermission(Permission perm,
java.lang.Long userId)
Checks whether the user has opted in to an extended application permission. |
boolean |
users_isAppAdded()
Deprecated. |
boolean |
users_isAppAdded(java.lang.Long userId)
Deprecated. |
boolean |
users_isAppUser()
|
boolean |
users_isAppUser(java.lang.Long userId)
Returns whether the user (either the session user or user specified by uid) has authorized the calling application. |
boolean |
users_setStatus(java.lang.String status)
Sets the logged-in user's Facebook status. |
boolean |
users_setStatus(java.lang.String newStatus,
boolean clear)
Set the user's profile status message. |
boolean |
users_setStatus(java.lang.String newStatus,
boolean clear,
boolean statusIncludesVerb)
Set the user's profile status message. |
boolean |
users_setStatus(java.lang.String newStatus,
boolean clear,
boolean statusIncludesVerb,
java.lang.Long userId)
Set the user's profile status message. |
boolean |
users_setStatus(java.lang.String newStatus,
boolean clear,
java.lang.Long userId)
Set the user's profile status message. |
boolean |
users_setStatus(java.lang.String status,
java.lang.Long userId)
Sets the spedified user's Facebook status. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.google.code.facebookapi.IFacebookRestClient |
|---|
admin_getAppPropertiesAsString, executeBatch, getCacheFriendsList, marketplace_getListings, marketplace_getSubCategories, marketplace_search, setCacheFriendsList |
| Field Detail |
|---|
protected static org.apache.commons.logging.Log log
public static final int BATCH_LIMIT
public static java.net.URL SERVER_URL
public static java.net.URL HTTPS_SERVER_URL
protected static javax.xml.bind.JAXBContext JAXB_CONTEXT
protected java.net.URL _serverUrl
protected int _timeout
protected int _readTimeout
protected final java.lang.String _apiKey
protected final java.lang.String _secret
protected boolean _isDesktop
protected java.lang.String cacheSessionKey
protected java.lang.Long cacheUserId
protected java.lang.Long cacheSessionExpires
protected java.lang.String cacheSessionSecret
protected java.lang.String rawResponse
protected boolean batchMode
protected java.util.List<com.google.code.facebookapi.BatchQuery> queries
protected java.lang.String permissionsApiKey
protected static final java.lang.String CRLF
protected static final java.lang.String PREF
protected static final int UPLOAD_BUFFER_SIZE
public static final java.lang.String MARKETPLACE_STATUS_DEFAULT
public static final java.lang.String MARKETPLACE_STATUS_NOT_SUCCESS
public static final java.lang.String MARKETPLACE_STATUS_SUCCESS
@Deprecated protected java.lang.Boolean cacheAppAdded
protected java.lang.Boolean cacheAppUser
| Constructor Detail |
|---|
protected ExtensibleClient(java.lang.String apiKey,
java.lang.String secret)
protected ExtensibleClient(java.lang.String apiKey,
java.lang.String secret,
int timeout)
protected ExtensibleClient(java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey)
protected ExtensibleClient(java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey,
int connectionTimeout)
protected ExtensibleClient(java.lang.String serverAddr,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey)
throws java.net.MalformedURLException
java.net.MalformedURLException
protected ExtensibleClient(java.lang.String serverAddr,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey,
int connectionTimeout)
throws java.net.MalformedURLException
java.net.MalformedURLException
protected ExtensibleClient(java.net.URL serverUrl,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey,
int timeout)
protected ExtensibleClient(java.net.URL serverUrl,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey,
int timeout,
int readTimeout)
protected ExtensibleClient(java.net.URL serverUrl,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey)
| Method Detail |
|---|
public static void initJaxbSupport()
public void beginPermissionsMode(java.lang.String apiKey)
IFacebookRestClient
beginPermissionsMode in interface IFacebookRestClient<T>apiKey - the API key of the application to being making requests for.public void endPermissionsMode()
IFacebookRestClient
endPermissionsMode in interface IFacebookRestClient<T>public javax.xml.bind.JAXBContext getJaxbContext()
IFacebookRestClient
getJaxbContext in interface IFacebookRestClient<T>public void setJaxbContext(javax.xml.bind.JAXBContext context)
IFacebookRestClient
setJaxbContext in interface IFacebookRestClient<T>context - the context to use.public abstract java.lang.String getResponseFormat()
public java.lang.String getSessionSecret()
public void setSessionSecret(java.lang.String key)
key - the new value to set. Incorrect values may cause your application to fail to run.@Deprecated public java.lang.Boolean getCacheAppAdded()
getCacheAppAdded in interface IFacebookRestClient<T>@Deprecated public void setCacheAppAdded(java.lang.Boolean cacheAppAdded)
setCacheAppAdded in interface IFacebookRestClient<T>public java.lang.Boolean getCacheAppUser()
getCacheAppUser in interface IFacebookRestClient<T>public void setCacheAppUser(java.lang.Boolean cacheAppUser)
setCacheAppUser in interface IFacebookRestClient<T>public java.lang.String getCacheSessionSecret()
getCacheSessionSecret in interface IFacebookRestClient<T>public void setCacheSessionSecret(java.lang.String cacheSessionSecret)
public void setCacheSession(java.lang.String cacheSessionKey,
java.lang.Long cacheUserId,
java.lang.Long cacheSessionExpires)
setCacheSession in interface IFacebookRestClient<T>public java.lang.Long getCacheSessionExpires()
getCacheSessionExpires in interface IFacebookRestClient<T>public void setCacheSessionExpires(java.lang.Long cacheSessionExpires)
public java.lang.String getCacheSessionKey()
getCacheSessionKey in interface IFacebookRestClient<T>public void setCacheSessionKey(java.lang.String cacheSessionKey)
public java.lang.Long getCacheUserId()
getCacheUserId in interface IFacebookRestClient<T>public void setCacheUserId(java.lang.Long cacheUserId)
public T friends_areFriends(long userId1,
long userId2)
throws FacebookException
IFacebookRestClient
friends_areFriends in interface IFacebookRestClient<T>FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Friends.areFriends
public T friends_areFriends(java.util.Collection<java.lang.Long> userIds1,
java.util.Collection<java.lang.Long> userIds2)
throws FacebookException
IFacebookRestClientuserIds1 is friends with the first user in userIds2,
the second user in userIds1 is friends with the second user in userIds2, etc.
friends_areFriends in interface IFacebookRestClient<T>FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Friends.areFriends
public boolean fbml_refreshRefUrl(java.lang.String url)
throws FacebookException
IFacebookRestClient
fbml_refreshRefUrl in interface IFacebookRestClient<T>url - string representing the URL to refresh
FacebookException
protected void handleFeedImages(java.util.List<Pair<java.lang.String,java.lang.CharSequence>> params,
java.util.Collection<? extends IPair<? extends java.lang.Object,java.net.URL>> images)
params - images -
public abstract java.lang.String auth_getSession(java.lang.String authToken)
throws FacebookException
auth_getSession in interface IFacebookRestClient<T>authToken - the token returned by auth_createToken or passed back to your callback_url.
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Auth.getSession
@Deprecated
public boolean feed_publishTemplatizedAction(java.lang.Long actorId,
java.lang.CharSequence titleTemplate)
throws FacebookException
IFacebookRestClient
feed_publishTemplatizedAction in interface IFacebookRestClient<T>actorId - deprecatedtitleTemplate - markup (up to 60 chars, tags excluded) for the feed story's title section. Must include the token {actor}.
FacebookException
public boolean feed_publishTemplatizedAction(java.lang.Long actorId,
java.lang.CharSequence titleTemplate,
java.util.Map<java.lang.String,java.lang.CharSequence> titleData,
java.lang.CharSequence bodyTemplate,
java.util.Map<java.lang.String,java.lang.CharSequence> bodyData,
java.lang.CharSequence bodyGeneral,
java.util.Collection<java.lang.Long> targetIds,
java.util.Collection<? extends IPair<? extends java.lang.Object,java.net.URL>> images)
throws FacebookException
feed_publishTemplatizedAction in interface IFacebookRestClient<T>actorId - the user into whose mini-feed the story is being published.titleTemplate - markup (up to 60 chars, tags excluded) for the feed story's title section. Must include the token {actor}.titleData - (optional) contains token-substitution mappings for tokens that appear in titleTemplate. Should not contain mappings for the {actor} or
{target} tokens. Required if tokens other than {actor} or {target} appear in the titleTemplate.bodyTemplate - (optional) markup to be displayed in the feed story's body section. can include tokens, of the form {token}, to be substituted using
bodyData.bodyData - (optional) contains token-substitution mappings for tokens that appear in bodyTemplate. Required if the bodyTemplate contains tokens other than
{actor} and {target}.bodyGeneral - (optional) additional body markup that is not aggregated. If multiple instances of this templated story are combined together, the markup in the
bodyGeneral of one of their stories may be displayed.targetIds - The user ids of friends of the actor, used for stories about a direct action between the actor and these targets of his/her action. Required if either
the titleTemplate or bodyTemplate includes the token {target}.images - (optional) additional body markup that is not aggregated. If multiple instances of this templated story are combined together, the markup in the
bodyGeneral of one of their stories may be displayed.
FacebookException
@Deprecated
public boolean feed_publishTemplatizedAction(java.lang.Integer actorId,
java.lang.CharSequence titleTemplate,
java.util.Map<java.lang.String,java.lang.CharSequence> titleData,
java.lang.CharSequence bodyTemplate,
java.util.Map<java.lang.String,java.lang.CharSequence> bodyData,
java.lang.CharSequence bodyGeneral,
java.util.Collection<java.lang.Long> targetIds,
java.util.Collection<? extends IPair<? extends java.lang.Object,java.net.URL>> images)
throws FacebookException
IFacebookRestClient
feed_publishTemplatizedAction in interface IFacebookRestClient<T>actorId - the user into whose mini-feed the story is being published.titleTemplate - markup (up to 60 chars, tags excluded) for the feed story's title section. Must include the token {actor}.titleData - (optional) contains token-substitution mappings for tokens that appear in titleTemplate. Should not contain mappings for the {actor} or
{target} tokens. Required if tokens other than {actor} or {target} appear in the titleTemplate.bodyTemplate - (optional) markup to be displayed in the feed story's body section. can include tokens, of the form {token}, to be substituted using
bodyData.bodyData - (optional) contains token-substitution mappings for tokens that appear in bodyTemplate. Required if the bodyTemplate contains tokens other than
{actor} and {target}.bodyGeneral - (optional) additional body markup that is not aggregated. If multiple instances of this templated story are combined together, the markup in the
bodyGeneral of one of their stories may be displayed.targetIds - The user ids of friends of the actor, used for stories about a direct action between the actor and these targets of his/her action. Required if either
the titleTemplate or bodyTemplate includes the token {target}.images - (optional) additional body markup that is not aggregated. If multiple instances of this templated story are combined together, the markup in the
bodyGeneral of one of their stories may be displayed.
FacebookException
public T groups_getMembers(java.lang.Number groupId)
throws FacebookException
IFacebookRestClient
groups_getMembers in interface IFacebookRestClient<T>groupId - the group id
FacebookException
public T friends_getAppUsers()
throws FacebookException
IFacebookRestClient
friends_getAppUsers in interface IFacebookRestClient<T>FacebookException
public T fql_query(java.lang.CharSequence query)
throws FacebookException
IFacebookRestClient
fql_query in interface IFacebookRestClient<T>query - :
the FQL query statement
FacebookException
public T groups_get(java.lang.Long userId,
java.util.Collection<java.lang.Long> groupIds)
throws FacebookException
IFacebookRestClient
groups_get in interface IFacebookRestClient<T>userId - Optional: User associated with groups. A null parameter will default to the session user.groupIds - Optional: group ids to query. A null parameter will get all groups for the user.
FacebookException
protected T callMethod(IFacebookMethod method,
Pair<java.lang.String,java.lang.CharSequence>... paramPairs)
throws FacebookException
method - the fieldName of the methodparamPairs - a list of arguments to the method
java.lang.Exception - with a description of any errors given to us by the server.
FacebookException
protected T callMethod(IFacebookMethod method,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> paramPairs)
throws FacebookException
method - the fieldName of the methodparamPairs - a list of arguments to the method
java.lang.Exception - with a description of any errors given to us by the server.
FacebookException
protected T callMethod(IFacebookMethod method,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> paramPairs,
java.lang.String fileName,
java.io.InputStream fileStream)
throws FacebookException
FacebookException
protected java.lang.String postFileRequest(IFacebookMethod method,
java.util.Map<java.lang.String,java.lang.String> params,
java.lang.String fileName,
java.io.InputStream fileStream)
throws java.io.IOException
photos_upload(java.io.File).
methodName - the name of the methodparams - request parameters (not including the file)doEncode - whether to UTF8-encode the parameters
java.io.IOExceptionphotos_upload(java.io.File)
protected abstract T parseCallResult(java.io.InputStream data,
IFacebookMethod method)
throws FacebookException,
java.io.IOException
data - an InputStream with the results of a request to the Facebook serversmethod - the method called
FacebookException - if data represents an error
java.io.IOException - if data is not readable
public boolean fbml_refreshRefUrl(java.net.URL url)
throws FacebookException
IFacebookRestClient
fbml_refreshRefUrl in interface IFacebookRestClient<T>url - the URL to refresh
FacebookException
public T notifications_get()
throws FacebookException
IFacebookRestClient
notifications_get in interface IFacebookRestClient<T>FacebookException
public T users_getStandardInfo(java.lang.Iterable<java.lang.Long> userIds,
java.util.Collection<ProfileField> fields)
throws FacebookException
IFacebookRestClient
users_getStandardInfo in interface IFacebookRestClient<T>userIds - a collection of user IDs for which to fetch infofields - a set of ProfileFields
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Users.getStandardInfo
public T users_getStandardInfo(java.lang.Iterable<java.lang.Long> userIds,
java.util.Set<java.lang.CharSequence> fields)
throws FacebookException
IFacebookRestClient
users_getStandardInfo in interface IFacebookRestClient<T>userIds - a collection of user IDs for which to fetch infofields - a set of strings describing the info fields desired, such as "last_name", "sex"
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Users.getStandardInfo
public T users_getInfo(java.lang.Iterable<java.lang.Long> userIds,
java.util.Collection<ProfileField> fields)
throws FacebookException
IFacebookRestClient
users_getInfo in interface IFacebookRestClient<T>userIds - a collection of user IDs for which to fetch infofields - a set of ProfileFields
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Users.getInfo
public T users_getInfo(java.lang.Iterable<java.lang.Long> userIds,
java.util.Set<java.lang.CharSequence> fields)
throws FacebookException
IFacebookRestClient
users_getInfo in interface IFacebookRestClient<T>userIds - a collection of user IDs for which to fetch infofields - a set of strings describing the info fields desired, such as "last_name", "sex"
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Users.getInfo
public long users_getLoggedInUser()
throws FacebookException
users_getLoggedInUser in interface IFacebookRestClient<T>FacebookException
@Deprecated
public long auth_getUserId(java.lang.String authToken)
throws FacebookException
auth_getUserId in interface IFacebookRestClient<T>FacebookExceptionpublic boolean isDesktop()
IFacebookRestClient
isDesktop in interface IFacebookRestClient<T>
@Deprecated
public boolean users_isAppAdded()
throws FacebookException
IFacebookRestClient
users_isAppAdded in interface IFacebookRestClient<T>FacebookException
public boolean users_isAppUser()
throws FacebookException
users_isAppUser in interface IFacebookRestClient<T>FacebookExceptionIFacebookRestClient.users_isAppUser(Long)
public boolean users_isAppUser(java.lang.Long userId)
throws FacebookException
IFacebookRestClient
users_isAppUser in interface IFacebookRestClient<T>userId - The user ID of the user who may have authorized the application. If this parameter is not specified, then it defaults to the session user. Note: This
parameter applies only to Web applications and is required by them only if the session_key is not specified. Facebook ignores this parameter if it is
passed by a desktop application.
FacebookException
public boolean users_setStatus(java.lang.String status)
throws FacebookException
IFacebookRestClient
users_setStatus in interface IFacebookRestClient<T>FacebookExceptionIFacebookRestClient.users_hasAppPermission(com.google.code.facebookapi.Permission),
FacebookExtendedPerm.STATUS_UPDATE,
http://wiki.developers.facebook.com/index.php/Users.setStatus
public boolean users_clearStatus()
throws FacebookException
IFacebookRestClient
users_clearStatus in interface IFacebookRestClient<T>FacebookExceptionIFacebookRestClient.users_hasAppPermission(com.google.code.facebookapi.Permission),
FacebookExtendedPerm.STATUS_UPDATE,
http://wiki.developers.facebook.com/index.php/Users.setStatus
@Deprecated
public java.net.URL notifications_send(java.util.Collection<java.lang.Long> recipientIds,
java.lang.CharSequence notification,
java.lang.CharSequence email)
throws FacebookException
IFacebookRestClient
notifications_send in interface IFacebookRestClient<T>recipientIds - the user ids to which the message is to be sentnotification - the FBML to display on the notifications pageemail - the FBML to send to the specified users via email, or null if no email should be sent
FacebookException
public boolean fbml_refreshImgSrc(java.lang.String imageUrl)
throws FacebookException
IFacebookRestClient
fbml_refreshImgSrc in interface IFacebookRestClient<T>imageUrl - String representing the image URL to refresh
FacebookExceptionpublic void setIsDesktop(boolean isDesktop)
IFacebookRestClient
setIsDesktop in interface IFacebookRestClient<T>isDesktop - set to true to enable desktop mode set to false to disable desktop mode
protected static java.lang.CharSequence delimit(java.util.Collection<java.util.Map.Entry<java.lang.String,java.lang.String>> entries,
java.lang.String delimiter,
java.lang.String equals,
boolean doEncode)
public boolean fbml_refreshImgSrc(java.net.URL imageUrl)
throws FacebookException
IFacebookRestClient
fbml_refreshImgSrc in interface IFacebookRestClient<T>imageUrl - the image URL to refresh
FacebookException
public T friends_get()
throws FacebookException
IFacebookRestClient
friends_get in interface IFacebookRestClient<T>FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Friends.get
public T friends_get(java.lang.Long uid)
throws FacebookException
IFacebookRestClient
friends_get in interface IFacebookRestClient<T>FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Friends.get
public java.lang.String auth_createToken()
throws FacebookException
IFacebookRestClient
auth_createToken in interface IFacebookRestClient<T>FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Auth.createToken
@Deprecated
public java.lang.Long marketplace_createListing(java.lang.Boolean showOnProfile,
MarketplaceListing attrs)
throws FacebookException
marketplace_createListing in interface IFacebookRestClient<T>showOnProfile - whether the listing can be shown on the user's profileattrs - the properties of the listing
FacebookExceptionMarketplaceListing,
Developers Wiki: marketplace.createListing
@Deprecated
public java.lang.Long marketplace_editListing(java.lang.Long listingId,
java.lang.Boolean showOnProfile,
MarketplaceListing attrs)
throws FacebookException
marketplace_editListing in interface IFacebookRestClient<T>listingId - identifies the listing to be modifiedshowOnProfile - whether the listing can be shown on the user's profileattrs - the properties of the listing
FacebookExceptionMarketplaceListing,
Developers Wiki: marketplace.createListing
public boolean marketplace_removeListing(java.lang.Long listingId)
throws FacebookException
marketplace_removeListing in interface IFacebookRestClient<T>listingId - the listing to be removed
FacebookException
@Deprecated
public boolean marketplace_removeListing(java.lang.Long listingId,
java.lang.CharSequence status)
throws FacebookException
marketplace_removeListing in interface IFacebookRestClient<T>listingId - the listing to be removedstatus - MARKETPLACE_STATUS_DEFAULT, MARKETPLACE_STATUS_SUCCESS, or MARKETPLACE_STATUS_NOT_SUCCESS
FacebookException
@Deprecated
public java.util.List<java.lang.String> marketplace_getCategories()
throws FacebookException
marketplace_getCategories in interface IFacebookRestClient<T>FacebookException
public T marketplace_getSubCategories(java.lang.CharSequence category)
throws FacebookException
marketplace_getSubCategories in interface IFacebookRestClient<T>category - a category, e.g. "HOUSING"
FacebookException
public T marketplace_getListings(java.util.Collection<java.lang.Long> listingIds,
java.util.Collection<java.lang.Long> userIds)
throws FacebookException
marketplace_getListings in interface IFacebookRestClient<T>listingIds - listing identifiers (required if uids is null/empty)userIds - posting user identifiers (required if listingIds is null/empty)
FacebookException
@Deprecated
public T marketplace_search(java.lang.CharSequence category,
java.lang.CharSequence subCategory,
java.lang.CharSequence query)
throws FacebookException
marketplace_search in interface IFacebookRestClient<T>category - the category of listings desired (optional except if subcategory is provided)subCategory - the subcategory of listings desired (optional)query - a query string (optional)
FacebookException
public T marketplace_getCategoriesObject()
throws FacebookException
marketplace_getCategoriesObject in interface IFacebookRestClient<T>FacebookExceptionpublic java.lang.String getRawResponse()
IFacebookRestClient
getRawResponse in interface IFacebookRestClient<T>public java.lang.Object getResponsePOJO()
IFacebookRestClient
getResponsePOJO in interface IFacebookRestClient<T>
public boolean feed_PublishTemplatizedAction(TemplatizedAction action)
throws FacebookException
IFacebookRestClient
feed_PublishTemplatizedAction in interface IFacebookRestClient<T>action - a TemplatizedAction instance that represents the feed data to publish
FacebookException - if any number of bad things happen
public boolean feed_publishTemplatizedAction(java.lang.String titleTemplate,
java.lang.String titleData,
java.lang.String bodyTemplate,
java.lang.String bodyData,
java.lang.String bodyGeneral,
java.util.Collection<? extends IPair<? extends java.lang.Object,java.net.URL>> pictures,
java.lang.String targetIds)
throws FacebookException
IFacebookRestClient
feed_publishTemplatizedAction in interface IFacebookRestClient<T>titleTemplate - the template for the title of the feed entry, this must contain the "(actor}" token. Any other tokens are optional, i.e. "{actor} recommends {place}".titleData - JSON-formatted values for any tokens used in titleTemplate, with the exception of "{actor}" and "{target}", which Facebook populates automatically, i.e.
"{place: "Bizou"}".bodyTemplate - the template for the body of the feed entry, works the same as 'titleTemplate', but is not required to contain the "{actor}" token.bodyData - works the same as titleDatabodyGeneral - non-templatized content for the body, may contain markup, may not contain tokens.pictures - a list of up to 4 images to display, with optional hyperlinks for each one.targetIds - a comma-seperated list of the UID's of any friend(s) who are involved in this feed action (if there are any), this specifies the value of the "{target}"
token. If you use this token in any of your templates, you must specify a value for this parameter.
FacebookException - if any number of bad things happen
protected boolean templatizedFeedHandler(java.lang.String titleTemplate,
java.lang.String titleData,
java.lang.String bodyTemplate,
java.lang.String bodyData,
java.lang.String bodyGeneral,
java.util.Collection<? extends IPair<? extends java.lang.Object,java.net.URL>> pictures,
java.lang.String targetIds,
java.lang.Long pageId)
throws FacebookException
FacebookException
public boolean users_hasAppPermission(Permission perm)
throws FacebookException
users_hasAppPermission in interface IFacebookRestClient<T>FacebookExceptionIFacebookRestClient.users_hasAppPermission(Permission,Long),
Users.hasAppPermission
public boolean users_hasAppPermission(Permission perm,
java.lang.Long userId)
throws FacebookException
IFacebookRestClient
users_hasAppPermission in interface IFacebookRestClient<T>perm - String identifier for the extended permission that is being checked for. Must be one of email, offline_access, status_update, photo_upload,
create_listing, create_event, rsvp_event, sms.userId - The user ID of the user whose permissions you are checking. If this parameter is not specified, then it defaults to the session user. Note: This
parameter applies only to Web applications and is required by them only if the session_key is not specified. Facebook ignores this parameter if it is
passed by a desktop application.
FacebookException
public java.lang.Long marketplace_createListing(java.lang.Long listingId,
boolean showOnProfile,
java.lang.String attributes)
throws FacebookException
IFacebookRestClient
marketplace_createListing in interface IFacebookRestClient<T>listingId - the id of the listing to modify, set to 0 (or null) to create a new listing.showOnProfile - set to true to show the listing on the user's profile (Facebook appears to ignore this setting).attributes - JSON-encoded attributes for this listing.
FacebookException - if an error happens when executing the API call.
public java.lang.Long marketplace_createListing(java.lang.Long listingId,
boolean showOnProfile,
MarketListing listing)
throws FacebookException
IFacebookRestClient
marketplace_createListing in interface IFacebookRestClient<T>listingId - the id of the listing to modify, set to 0 (or null) to create a new listing.showOnProfile - set to true to show the listing on the user's profile, set to false to prevent the listing from being shown on the profile.listing - the listing to publish.
FacebookException - if an error happens when executing the API call.
public java.lang.Long marketplace_createListing(boolean showOnProfile,
MarketListing listing)
throws FacebookException
IFacebookRestClient
marketplace_createListing in interface IFacebookRestClient<T>showOnProfile - set to true to show the listing on the user's profile, set to false to prevent the listing from being shown on the profile.listing - the listing to publish.
FacebookException - if an error happens when executing the API call.
public boolean marketplace_removeListing(java.lang.Long listingId,
MarketListingStatus status)
throws FacebookException
IFacebookRestClient
marketplace_removeListing in interface IFacebookRestClient<T>listingId - the id of the listing to remove.status - the status to apply when removing the listing. Should be one of MarketListingStatus.SUCCESS or MarketListingStatus.NOT_SUCCESS.
FacebookException - if an error happens when executing the API call.
public java.lang.Long marketplace_editListing(java.lang.Long listingId,
java.lang.Boolean showOnProfile,
MarketListing attrs)
throws FacebookException
IFacebookRestClient
marketplace_editListing in interface IFacebookRestClient<T>listingId - identifies the listing to be modifiedshowOnProfile - whether the listing can be shown on the user's profileattrs - the properties of the listing
FacebookExceptionMarketplaceListing,
Developers Wiki: marketplace.createListing
public boolean users_setStatus(java.lang.String newStatus,
boolean clear)
throws FacebookException
IFacebookRestClient
users_setStatus in interface IFacebookRestClient<T>newStatus - the new status message to set.clear - whether or not to clear the old status message.
FacebookException - if an error happens when executing the API call.http://wiki.developers.facebook.com/index.php/Users.setStatus
public T pages_getInfo(java.util.Collection<java.lang.Long> pageIds,
java.util.EnumSet<PageProfileField> fields)
throws FacebookException
pageIds. Can be called for pages that have added the application
without establishing a session.
pages_getInfo in interface IFacebookRestClient<T>pageIds - the page IDsfields - a set of page profile fields
FacebookException
public T pages_getInfo(java.util.Collection<java.lang.Long> pageIds,
java.util.Set<java.lang.CharSequence> fields)
throws FacebookException
pageIds. Can be called for pages that have added the application
without establishing a session.
pages_getInfo in interface IFacebookRestClient<T>pageIds - the page IDsfields - a set of page profile fields
FacebookException
public T pages_getInfo(java.lang.Long userId,
java.util.EnumSet<PageProfileField> fields)
throws FacebookException
userId.
pages_getInfo in interface IFacebookRestClient<T>userId - the ID of a user about whose pages to fetch info (defaulted to the logged-in user)fields - a set of PageProfileFields
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Pages.getInfo
public T pages_getInfo(java.lang.Long userId,
java.util.Set<java.lang.CharSequence> fields)
throws FacebookException
userId.
pages_getInfo in interface IFacebookRestClient<T>userId - the ID of a user about whose pages to fetch info (defaulted to the logged-in user)fields - a set of page profile fields
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Pages.getInfo
public boolean pages_isAppAdded(java.lang.Long pageId)
throws FacebookException
pages_isAppAdded in interface IFacebookRestClient<T>pageId - the ID of the page
FacebookException
public boolean pages_isFan(java.lang.Long pageId,
java.lang.Long userId)
throws FacebookException
pageId.
pages_isFan in interface IFacebookRestClient<T>pageId - the ID of the pageuserId - the ID of the user (defaults to the logged-in user if null)
FacebookException
public boolean pages_isFan(java.lang.Long pageId)
throws FacebookException
pageId.
pages_isFan in interface IFacebookRestClient<T>pageId - the ID of the page
FacebookException
public boolean pages_isAdmin(java.lang.Long pageId)
throws FacebookException
pageId.
pages_isAdmin in interface IFacebookRestClient<T>pageId - the ID of the page
FacebookException
public boolean fbml_setRefHandle(java.lang.String handle,
java.lang.String fbmlMarkup)
throws FacebookException
handle" with FBML markup so that the handle can be used within the fb:ref FBML tag. A handle is unique within an application and allows an application to publish
identical FBML to many user profiles and do subsequent updates without having to republish FBML for each user.
fbml_setRefHandle in interface IFacebookRestClient<T>handle - -
a string, unique within the application, thatfbmlMarkup - -
refer to the FBML documentation for a description of the markup and its role in various contexts
FacebookException - if an error happens when executing the API call.
public void notifications_send(java.util.Collection<java.lang.Long> recipientIds,
java.lang.CharSequence notification)
throws FacebookException
IFacebookRestClient
notifications_send in interface IFacebookRestClient<T>recipientIds - the user ids to which the message is to be sent.notification - the FBML to display on the notifications page.
FacebookException
public boolean users_setStatus(java.lang.String newStatus,
boolean clear,
boolean statusIncludesVerb)
throws FacebookException
IFacebookRestClient
users_setStatus in interface IFacebookRestClient<T>newStatus - the new status message to set.clear - whether or not to clear the old status message.statusIncludesVerb - set to true if you do not want the Facebook Platform to automatically prepend "is " to your status message set to false if you want the "is " prepended
(default behavior)
FacebookException - if an error happens when executing the API call.http://wiki.developers.facebook.com/index.php/Users.setStatus
public void notifications_send(java.lang.CharSequence notification)
throws FacebookException
notifications_send in interface IFacebookRestClient<T>notification - the FBML to be displayed on the notifications page; only a stripped-down set of FBML tags that result in text and links is allowed
FacebookException
public T data_getCookies()
throws FacebookException
IFacebookRestClient
data_getCookies in interface IFacebookRestClient<T>FacebookException
public T data_getCookies(java.lang.Long userId)
throws FacebookException
IFacebookRestClient
data_getCookies in interface IFacebookRestClient<T>userId - the id of the user to get the cookies for.
FacebookException
public T data_getCookies(java.lang.String name)
throws FacebookException
IFacebookRestClient
data_getCookies in interface IFacebookRestClient<T>name - the name of the cookie to retrieve.
FacebookException
public T data_getCookies(java.lang.Long userId,
java.lang.CharSequence name)
throws FacebookException
IFacebookRestClient
data_getCookies in interface IFacebookRestClient<T>userId - the id of the user to get the cookies for.name - the name of the cookie to retrieve.
FacebookException
public boolean data_setCookie(java.lang.String name,
java.lang.String value)
throws FacebookException
IFacebookRestClient
data_setCookie in interface IFacebookRestClient<T>name - the name of the cookie to setvalue - the value of the cookie
FacebookException
public boolean data_setCookie(java.lang.String name,
java.lang.String value,
java.lang.String path)
throws FacebookException
IFacebookRestClient
data_setCookie in interface IFacebookRestClient<T>name - the name of the cookie to setvalue - the value of the cookiepath - the path relative to the application's callback URL, with which the cookie should be associated. (default is "/")
FacebookException
public boolean data_setCookie(java.lang.Long userId,
java.lang.CharSequence name,
java.lang.CharSequence value)
throws FacebookException
IFacebookRestClient
data_setCookie in interface IFacebookRestClient<T>userId - the id of the user to set the cookie for.name - the name of the cookie to setvalue - the value of the cookie
FacebookException
public boolean data_setCookie(java.lang.Long userId,
java.lang.CharSequence name,
java.lang.CharSequence value,
java.lang.CharSequence path)
throws FacebookException
IFacebookRestClient
data_setCookie in interface IFacebookRestClient<T>userId - the id of the user to set the cookie for.name - the name of the cookie to setvalue - the value of the cookiepath - the path relative to the application's callback URL, with which the cookie should be associated. (default is "/")
FacebookException
public boolean data_setCookie(java.lang.String name,
java.lang.String value,
java.lang.Long expires)
throws FacebookException
IFacebookRestClient
data_setCookie in interface IFacebookRestClient<T>name - the name of the cookie to setvalue - the value of the cookieexpires - the timestamp at which the cookie expires
FacebookException
public boolean data_setCookie(java.lang.String name,
java.lang.String value,
java.lang.Long expires,
java.lang.String path)
throws FacebookException
IFacebookRestClient
data_setCookie in interface IFacebookRestClient<T>name - the name of the cookie to setvalue - the value of the cookieexpires - the timestamp at which the cookie expirespath - the path relative to the application's callback URL, with which the cookie should be associated. (default is "/")
FacebookException
public boolean data_setCookie(java.lang.Long userId,
java.lang.CharSequence name,
java.lang.CharSequence value,
java.lang.Long expires)
throws FacebookException
IFacebookRestClient
data_setCookie in interface IFacebookRestClient<T>userId - the id of the user to set the cookie for.name - the name of the cookie to setvalue - the value of the cookieexpires - the timestamp at which the cookie expires
FacebookException
public boolean data_setCookie(java.lang.Long userId,
java.lang.CharSequence name,
java.lang.CharSequence value,
java.lang.Long expires,
java.lang.CharSequence path)
throws FacebookException
IFacebookRestClient
data_setCookie in interface IFacebookRestClient<T>userId - the id of the user to set the cookie for.name - the name of the cookie to setvalue - the value of the cookieexpires - the timestamp at which the cookie expirespath - the path relative to the application's callback URL, with which the cookie should be associated. (default is "/")
FacebookException
public java.lang.String data_getUserPreference(int prefId)
throws FacebookException
IFacebookRestClient
data_getUserPreference in interface IFacebookRestClient<T>prefId - the id of the preference to lookup. This should be an integer value from 0-200.
FacebookException - if an error happens when executing the API call.
public T data_getUserPreferences()
throws FacebookException
IFacebookRestClient
data_getUserPreferences in interface IFacebookRestClient<T>FacebookException - if an error happens when executing the API call.
public void data_setUserPreference(int prefId,
java.lang.String value)
throws FacebookException
IFacebookRestClient
data_setUserPreference in interface IFacebookRestClient<T>prefId - the id of the preference to set, an integer between 0 and 200.value - the value to store, a String of up to 127 characters in length.
FacebookException - if an error happens when executing the API call.
public void data_setUserPreferences(java.util.Map<java.lang.Integer,java.lang.String> values,
boolean replace)
throws FacebookException
IFacebookRestClient
data_setUserPreferences in interface IFacebookRestClient<T>values - the values to store, specified in a map. The keys should be preference-id values from 0-200, and the values should be strings of up to 127 characters in
length.replace - set to true if you want to remove any pre-existing preferences before writing the new ones set to false if you want the new preferences to be merged
with any pre-existing preferences
FacebookException - if an error happens when executing the API call.
public long data_createObject(java.lang.String objectType,
java.util.Map<java.lang.String,java.lang.String> properties)
throws FacebookException
IFacebookRestClient
data_createObject in interface IFacebookRestClient<T>objectType - Specifies which type of new object to create.properties - Optional - Name-value pairs of properties this new object has
FacebookException
public void data_updateObject(long objectId,
java.util.Map<java.lang.String,java.lang.String> properties,
boolean replace)
throws FacebookException
IFacebookRestClient
data_updateObject in interface IFacebookRestClient<T>objectId - Numeric identifier (fbid) of the object to modify.properties - Name-value pairs of new properties.replace - True if replace all existing properties; false to merge into existing ones.
FacebookException
public void data_deleteObject(long objectId)
throws FacebookException
IFacebookRestClient
data_deleteObject in interface IFacebookRestClient<T>objectId - Numeric identifier (fbid) of the object to delete.
FacebookExceptionIFacebookRestClient.data_deleteObjects(java.util.Collection) ,
Developers Wiki: Data.deleteObject
public void data_deleteObjects(java.util.Collection<java.lang.Long> objectIds)
throws FacebookException
IFacebookRestClient
data_deleteObjects in interface IFacebookRestClient<T>objectIds - A list of 64-bit integers that are numeric identifiers (fbids) of objects to delete.
FacebookExceptionIFacebookRestClient.data_deleteObject(long),
Developers Wiki: Data.deleteObjects
public T data_getObject(long objectId)
throws FacebookException
data_getObject in interface IFacebookRestClient<T>FacebookException
public T data_getObjects(java.util.Collection<java.lang.Long> objectIds)
throws FacebookException
data_getObjects in interface IFacebookRestClient<T>FacebookException
public T data_getObjectProperty(long objectId,
java.lang.String propertyName)
throws FacebookException
data_getObjectProperty in interface IFacebookRestClient<T>FacebookException
public void data_setObjectProperty(long objectId,
java.lang.String propertyName,
java.lang.String value)
throws FacebookException
data_setObjectProperty in interface IFacebookRestClient<T>FacebookException
public void data_createObjectType(java.lang.String name)
throws FacebookException
IFacebookRestClient
data_createObjectType in interface IFacebookRestClient<T>FacebookException
public void data_dropObjectType(java.lang.String objectType)
throws FacebookException
IFacebookRestClient
data_dropObjectType in interface IFacebookRestClient<T>FacebookException
public void data_renameObjectType(java.lang.String objectType,
java.lang.String newName)
throws FacebookException
data_renameObjectType in interface IFacebookRestClient<T>FacebookException
public void data_defineObjectProperty(java.lang.String objectType,
java.lang.String propertyName,
PropertyType propertyType)
throws FacebookException
data_defineObjectProperty in interface IFacebookRestClient<T>FacebookException
public void data_undefineObjectProperty(java.lang.String objectType,
java.lang.String propertyName)
throws FacebookException
data_undefineObjectProperty in interface IFacebookRestClient<T>FacebookException
public void data_renameObjectProperty(java.lang.String objectType,
java.lang.String propertyName,
java.lang.String newPropertyName)
throws FacebookException
data_renameObjectProperty in interface IFacebookRestClient<T>FacebookException
public T data_getObjectTypes()
throws FacebookException
data_getObjectTypes in interface IFacebookRestClient<T>FacebookException
public T data_getObjectType(java.lang.String objectType)
throws FacebookException
data_getObjectType in interface IFacebookRestClient<T>FacebookException
public void data_defineAssociation(java.lang.String associationName,
AssociationType associationType,
AssociationInfo associationInfo1,
AssociationInfo associationInfo2,
java.lang.String inverseName)
throws FacebookException
data_defineAssociation in interface IFacebookRestClient<T>associationName - Name of forward association to create. This name needs to be unique among all object types and associations defined for this application. This name also
needs to be a valid identifier, which is no longer than 32 characters, starting with a letter (a-z) and consisting of only small letters (a-z), numbers
(0-9) and/or underscores.inverseName - Optional - name of backward association, if it is two-way asymmetric. This name needs to be unique among all object types and associations defined for
this application. This name also needs to be a valid identifier, which is no longer than 32 characters, starting with a letter (a-z) and consisting of
only small letters (a-z), numbers (0-9) and/or underscores.
FacebookException
public void data_undefineAssociation(java.lang.String name)
throws FacebookException
IFacebookRestClient
data_undefineAssociation in interface IFacebookRestClient<T>FacebookException
public void data_renameAssociation(java.lang.String name,
java.lang.String newName,
java.lang.String newAlias1,
java.lang.String newAlias2)
throws FacebookException
IFacebookRestClient
data_renameAssociation in interface IFacebookRestClient<T>FacebookException
public T data_getAssociationDefinition(java.lang.String name)
throws FacebookException
data_getAssociationDefinition in interface IFacebookRestClient<T>FacebookException
public T data_getAssociationDefinitions()
throws FacebookException
data_getAssociationDefinitions in interface IFacebookRestClient<T>FacebookException
public void data_setAssociation(java.lang.String associationName,
long object1Id,
long object2Id,
java.lang.String data,
java.util.Date associationTime)
throws FacebookException
IFacebookRestClient
data_setAssociation in interface IFacebookRestClient<T>associationName - Name of the association to set.object1Id - Object identifier 1.object2Id - Object identifier 2.data - Optional (can be null) - An arbitrary data (max. 255 characters) to store with this association.associationTime - Optional (can be null) - Default to association creation time. A timestamp to store with this association. This timestamp is represented as number of
seconds since the Unix Epoch (January 1 1970 00:00:00 GMT). )
FacebookException
public void data_removeAssociation(java.lang.String associationName,
long object1Id,
long object2Id)
throws FacebookException
IFacebookRestClient
data_removeAssociation in interface IFacebookRestClient<T>associationName - Name of the association.object1Id - Object identifier 1.object2Id - Object identifier 2.
FacebookException
public void data_removeAssociatedObjects(java.lang.String associationName,
long objectId)
throws FacebookException
IFacebookRestClient
data_removeAssociatedObjects in interface IFacebookRestClient<T>associationName - Name of the association.objectId - Object identifier.
FacebookException
public long data_getAssociatedObjectCount(java.lang.String associationName,
long objectId)
throws FacebookException
IFacebookRestClient
data_getAssociatedObjectCount in interface IFacebookRestClient<T>associationName - Name of the association.objectId - Object identifier.
FacebookException
public boolean admin_setAppProperties(java.util.Map<ApplicationProperty,java.lang.String> properties)
throws FacebookException
IFacebookRestClient
admin_setAppProperties in interface IFacebookRestClient<T>properties - a Map containing the properties to set.
FacebookException
@Deprecated
public org.json.JSONObject admin_getAppProperties(java.util.Collection<ApplicationProperty> properties)
throws FacebookException
IFacebookRestClient
admin_getAppProperties in interface IFacebookRestClient<T>properties - a collection indicating the properties you are interested in retrieving.
FacebookException
public java.util.Map<ApplicationProperty,java.lang.String> admin_getAppPropertiesMap(java.util.Collection<ApplicationProperty> properties)
throws FacebookException
IFacebookRestClient
admin_getAppPropertiesMap in interface IFacebookRestClient<T>properties - a collection indicating the properties you are interested in retrieving.
FacebookException
public boolean feed_publishTemplatizedAction(java.lang.CharSequence titleTemplate)
throws FacebookException
IFacebookRestClient
feed_publishTemplatizedAction in interface IFacebookRestClient<T>titleTemplate - markup (up to 60 chars, tags excluded) for the feed story's title section. Must include the token {actor}.
FacebookException
public boolean feed_publishTemplatizedAction(java.lang.CharSequence titleTemplate,
java.lang.Long pageActorId)
throws FacebookException
IFacebookRestClientpageActorId is provided, page), and publishes aggregating News
Feed stories to the user's friends/page's fans. Stories are identified as being combinable if they have matching templates and substituted values.
feed_publishTemplatizedAction in interface IFacebookRestClient<T>titleTemplate - markup (up to 60 chars, tags excluded) for the feed story's title section. Must include the token {actor}.pageActorId - (optional) the ID of the page into whose mini-feed the story is being published
FacebookException
public boolean feed_publishTemplatizedAction(java.lang.CharSequence titleTemplate,
java.util.Map<java.lang.String,java.lang.CharSequence> titleData,
java.lang.CharSequence bodyTemplate,
java.util.Map<java.lang.String,java.lang.CharSequence> bodyData,
java.lang.CharSequence bodyGeneral,
java.util.Collection<java.lang.Long> targetIds,
java.util.Collection<? extends IPair<? extends java.lang.Object,java.net.URL>> images,
java.lang.Long pageActorId)
throws FacebookException
IFacebookRestClientpageActorId is provided, page), and publishes aggregating News
Feed stories to the user's friends/page's fans. Stories are identified as being combinable if they have matching templates and substituted values.
feed_publishTemplatizedAction in interface IFacebookRestClient<T>titleTemplate - markup (up to 60 chars, tags excluded) for the feed story's title section. Must include the token {actor}.titleData - (optional) contains token-substitution mappings for tokens that appear in titleTemplate. Should not contain mappings for the {actor} or
{target} tokens. Required if tokens other than {actor} or {target} appear in the titleTemplate.bodyTemplate - (optional) markup to be displayed in the feed story's body section. can include tokens, of the form {token}, to be substituted using
bodyData.bodyData - (optional) contains token-substitution mappings for tokens that appear in bodyTemplate. Required if the bodyTemplate contains tokens other than
{actor} and {target}.bodyGeneral - (optional) additional body markup that is not aggregated. If multiple instances of this templated story are combined together, the markup in the
bodyGeneral of one of their stories may be displayed.targetIds - The user ids of friends of the actor, used for stories about a direct action between the actor and these targets of his/her action. Required if either
the titleTemplate or bodyTemplate includes the token {target}.images - (optional) additional body markup that is not aggregated. If multiple instances of this templated story are combined together, the markup in the
bodyGeneral of one of their stories may be displayed.pageActorId - (optional) the ID of the page into whose mini-feed the story is being published
FacebookException
public T friends_getList(java.lang.Long friendListId)
throws FacebookException
IFacebookRestClientfriendListId.
friends_getList in interface IFacebookRestClient<T>friendListId - the friend list for which friends should be fetched. if null, all friends will be retrieved.
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Friends.get
public T friends_getLists()
throws FacebookException
IFacebookRestClient
friends_getLists in interface IFacebookRestClient<T>FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Friends.getLists
public boolean admin_setAppProperties(ApplicationPropertySet properties)
throws FacebookException
admin_setAppProperties in interface IFacebookRestClient<T>properties - an ApplicationPropertySet that is translated into a single JSON String.
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Admin.setAppProperties
public ApplicationPropertySet admin_getAppPropertiesAsSet(java.util.EnumSet<ApplicationProperty> properties)
throws FacebookException
admin.setAppProperties call. A
session is not required to use this method.
admin_getAppPropertiesAsSet in interface IFacebookRestClient<T>properties - an enumeration of the properties to get
FacebookExceptionApplicationProperty,
Developers Wiki: Admin.getAppPropertiespublic void beginBatch()
IFacebookRestClient
beginBatch in interface IFacebookRestClient<T>
protected java.lang.String encodeMethods(java.util.List<com.google.code.facebookapi.BatchQuery> queries)
throws FacebookException
FacebookException
public T batch_run(java.lang.String methods,
boolean serial)
throws FacebookException
IFacebookRestClient
batch_run in interface IFacebookRestClient<T>methods - A JSON encoded array of strings. Each element in the array should contain the full parameters for a method, including method name, sig, etc. Currently,
there is a maximum limit of 15 elements in the array.serial - An optional parameter to indicate whether the methods in the method_feed must be executed in order. The default value is false.
FacebookException
public T application_getPublicInfo(java.lang.Long applicationId,
java.lang.String applicationKey,
java.lang.String applicationCanvas)
throws FacebookException
IFacebookRestClient
application_getPublicInfo in interface IFacebookRestClient<T>applicationId - the id of the application to get the info for.applicationKey - the public API key of the application to get the info for.applicationCanvas - the canvas-page name of the application to get the info for.
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Application.getPublicInfo
public T application_getPublicInfoById(java.lang.Long applicationId)
throws FacebookException
IFacebookRestClient
application_getPublicInfoById in interface IFacebookRestClient<T>applicationId - the id of the application to get the info for.
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Application.getPublicInfo
public T application_getPublicInfoByApiKey(java.lang.String applicationKey)
throws FacebookException
IFacebookRestClient
application_getPublicInfoByApiKey in interface IFacebookRestClient<T>applicationKey - the public API key of the application to get the info for.
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Application.getPublicInfo
public T application_getPublicInfoByCanvasName(java.lang.String applicationCanvas)
throws FacebookException
IFacebookRestClient
application_getPublicInfoByCanvasName in interface IFacebookRestClient<T>applicationCanvas - the canvas-page name of the application to get the info for.
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Application.getPublicInfo
public int admin_getAllocation(java.lang.String allocationType)
throws FacebookException
IFacebookRestClient
admin_getAllocation in interface IFacebookRestClient<T>allocationType - the type of request to check the allocation for. Currently: "notifications_per_day" and "requests_per_day", "emails_per_day",
"email_disable_message_location"
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Admin.getAllocation
public int admin_getAllocation(AllocationType allocationType)
throws FacebookException
IFacebookRestClient
admin_getAllocation in interface IFacebookRestClient<T>allocationType - the type of request to check the allocation for. Currently: "notifications_per_day" and "requests_per_day", "emails_per_day",
"email_disable_message_location"
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Admin.getAllocation
@Deprecated
public int admin_getNotificationAllocation()
throws FacebookException
IFacebookRestClient
admin_getNotificationAllocation in interface IFacebookRestClient<T>FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Admin.getAllocation
@Deprecated
public int admin_getRequestAllocation()
throws FacebookException
IFacebookRestClient
admin_getRequestAllocation in interface IFacebookRestClient<T>FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Admin.getAllocation
@Deprecated
public T admin_getDailyMetrics(java.util.Set<Metric> metrics,
java.util.Date start,
java.util.Date end)
throws FacebookException
IFacebookRestClient
admin_getDailyMetrics in interface IFacebookRestClient<T>metrics - a set specifying the specific metrics to retrievestart - the starting date to retrieve data for (range must not exceed 30 days)end - the ending to to retrive data for (range must not exceed 30 days)
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Admin.getDailyMetrics
@Deprecated
public T admin_getDailyMetrics(java.util.Set<Metric> metrics,
long start,
long end)
throws FacebookException
IFacebookRestClient
admin_getDailyMetrics in interface IFacebookRestClient<T>metrics - a set specifying the specific metrics to retrievestart - the starting date to retrieve data for (range must not exceed 30 days), the accepted unit of time is milliseconds, NOT secondsend - the ending to to retrive data for (range must not exceed 30 days), the accepted unit of time is milliseconds, NOT seconds
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Admin.getDailyMetrics
public T permissions_checkGrantedApiAccess(java.lang.String apiKey)
throws FacebookException
IFacebookRestClient
permissions_checkGrantedApiAccess in interface IFacebookRestClient<T>apiKey - the API key of the application to check permissions for.
FacebookException
public T permissions_checkAvailableApiAccess(java.lang.String apiKey)
throws FacebookException
IFacebookRestClient
permissions_checkAvailableApiAccess in interface IFacebookRestClient<T>apiKey - the API key of the application to check for permissions from.
FacebookException
public boolean permissions_grantApiAccess(java.lang.String apiKey,
java.util.Set<FacebookMethod> methods)
throws FacebookException
IFacebookRestClient
permissions_grantApiAccess in interface IFacebookRestClient<T>apiKey - the API-key of the application to grant permission to.methods - the API methods to allow the other application to call. If the set is empty or null, permission is granted for all API methods.
FacebookException
public boolean permissions_grantFullApiAccess(java.lang.String apiKey)
throws FacebookException
IFacebookRestClient
permissions_grantFullApiAccess in interface IFacebookRestClient<T>apiKey - the API-key of the application to grant permission to.
FacebookException
public boolean permissions_revokeApiAccess(java.lang.String apiKey)
throws FacebookException
IFacebookRestClient
permissions_revokeApiAccess in interface IFacebookRestClient<T>apiKey - the API key of the application to remove permissions for.
FacebookException
public java.lang.String auth_promoteSession()
throws FacebookException
IFacebookRestClient
auth_promoteSession in interface IFacebookRestClient<T>FacebookException
public boolean auth_revokeAuthorization()
throws FacebookException
IFacebookRestClient
auth_revokeAuthorization in interface IFacebookRestClient<T>FacebookException
public boolean auth_expireSession()
throws FacebookException
IFacebookRestClient
auth_expireSession in interface IFacebookRestClient<T>FacebookException
public java.lang.Long marketplace_createListing(java.lang.Long listingId,
boolean showOnProfile,
java.lang.String attributes,
java.lang.Long userId)
throws FacebookException
IFacebookRestClient
marketplace_createListing in interface IFacebookRestClient<T>listingId - the id of the listing to modify, set to 0 (or null) to create a new listing.showOnProfile - set to true to show the listing on the user's profile (Facebook appears to ignore this setting).attributes - JSON-encoded attributes for this listing.userId - the id of the user to create the listing for.
FacebookException - if an error happens when executing the API call.
public java.lang.Long marketplace_createListing(java.lang.Long listingId,
boolean showOnProfile,
MarketListing listing,
java.lang.Long userId)
throws FacebookException
IFacebookRestClient
marketplace_createListing in interface IFacebookRestClient<T>listingId - the id of the listing to modify, set to 0 (or null) to create a new listing.showOnProfile - set to true to show the listing on the user's profile, set to false to prevent the listing from being shown on the profile.listing - the listing to publish.userId - the id of the user to create the listing for.
FacebookException - if an error happens when executing the API call.
public java.lang.Long marketplace_createListing(boolean showOnProfile,
MarketListing listing,
java.lang.Long userId)
throws FacebookException
IFacebookRestClient
marketplace_createListing in interface IFacebookRestClient<T>showOnProfile - set to true to show the listing on the user's profile, set to false to prevent the listing from being shown on the profile.listing - the listing to publish.userId - the id of the user to create the listing for.
FacebookException - if an error happens when executing the API call.
public boolean marketplace_removeListing(java.lang.Long listingId,
java.lang.Long userId)
throws FacebookException
IFacebookRestClient
marketplace_removeListing in interface IFacebookRestClient<T>listingId - the listing to be removeduserId - the id of the user removing the listing
FacebookExceptionIFacebookRestClient.users_hasAppPermission(com.google.code.facebookapi.Permission),
FacebookExtendedPerm.MARKETPLACE,
Developers Wiki: marketplace.removeListing
public boolean marketplace_removeListing(java.lang.Long listingId,
MarketListingStatus status,
java.lang.Long userId)
throws FacebookException
IFacebookRestClient
marketplace_removeListing in interface IFacebookRestClient<T>listingId - the id of the listing to remove.status - the status to apply when removing the listing. Should be one of MarketListingStatus.SUCCESS or MarketListingStatus.NOT_SUCCESS.userId - the id of the user removing the listing.
FacebookException - if an error happens when executing the API call.
@Deprecated
public boolean users_isAppAdded(java.lang.Long userId)
throws FacebookException
IFacebookRestClient
users_isAppAdded in interface IFacebookRestClient<T>userId - the if of the user to check for.
FacebookException
public boolean users_setStatus(java.lang.String status,
java.lang.Long userId)
throws FacebookException
IFacebookRestClient
users_setStatus in interface IFacebookRestClient<T>FacebookExceptionIFacebookRestClient.users_hasAppPermission(com.google.code.facebookapi.Permission),
FacebookExtendedPerm.STATUS_UPDATE,
http://wiki.developers.facebook.com/index.php/Users.setStatus
public boolean users_setStatus(java.lang.String newStatus,
boolean clear,
java.lang.Long userId)
throws FacebookException
IFacebookRestClient
users_setStatus in interface IFacebookRestClient<T>newStatus - the new status message to set.clear - whether or not to clear the old status message.userId - the id of the user to set the status for.
FacebookException - if an error happens when executing the API call.http://wiki.developers.facebook.com/index.php/Users.setStatus
public boolean users_setStatus(java.lang.String newStatus,
boolean clear,
boolean statusIncludesVerb,
java.lang.Long userId)
throws FacebookException
IFacebookRestClient
users_setStatus in interface IFacebookRestClient<T>newStatus - the new status message to set.clear - whether or not to clear the old status message.statusIncludesVerb - set to true if you do not want the Facebook Platform to automatically prepend "is " to your status message set to false if you want the "is " prepended
(default behavior)userId - the id of the user to set the status for.
FacebookException - if an error happens when executing the API call.http://wiki.developers.facebook.com/index.php/Users.setStatus
public T feed_getRegisteredTemplateBundleByID(java.lang.Long id)
throws FacebookException
IFacebookRestClient
feed_getRegisteredTemplateBundleByID in interface IFacebookRestClient<T>id - the id to retrieve.
FacebookException
public T feed_getRegisteredTemplateBundles()
throws FacebookException
IFacebookRestClient
feed_getRegisteredTemplateBundles in interface IFacebookRestClient<T>FacebookException
public java.lang.Boolean feed_publishUserAction(java.lang.Long bundleId)
throws FacebookException
IFacebookRestClient
feed_publishUserAction in interface IFacebookRestClient<T>bundleId - the template bundle-id to use to render the feed.
FacebookException
public java.lang.Boolean feed_publishUserAction(java.lang.Long bundleId,
java.util.Map<java.lang.String,java.lang.String> templateData,
java.util.List<java.lang.Long> targetIds,
java.lang.String bodyGeneral)
throws FacebookException
IFacebookRestClient
feed_publishUserAction in interface IFacebookRestClient<T>bundleId - the template bundle-id to use to render the feed.templateData - a map of name-value pairs to substitute into the template being rendered.targetIds - the ids of individuals that are the target of this action.bodyGeneral - additional markup to include in the feed story.
FacebookException
public java.lang.Long feed_registerTemplateBundle(java.lang.String template)
throws FacebookException
IFacebookRestClient
feed_registerTemplateBundle in interface IFacebookRestClient<T>template - the template to store
FacebookException
public java.lang.Long feed_registerTemplateBundle(java.util.Collection<java.lang.String> templates)
throws FacebookException
IFacebookRestClient
feed_registerTemplateBundle in interface IFacebookRestClient<T>templates - the templates to store
FacebookException
public java.lang.Long feed_registerTemplateBundle(java.util.Collection<java.lang.String> templates,
java.util.Collection<BundleStoryTemplate> shortTemplates,
BundleStoryTemplate longTemplate)
throws FacebookException
IFacebookRestClient
feed_registerTemplateBundle in interface IFacebookRestClient<T>longTemplate - the long template to store.
FacebookException
public java.lang.Long feed_registerTemplateBundle(java.util.Collection<java.lang.String> templates,
java.util.Collection<BundleStoryTemplate> shortTemplates,
BundleStoryTemplate longTemplate,
java.util.List<BundleActionLink> actionLinks)
throws FacebookException
IFacebookRestClient
feed_registerTemplateBundle in interface IFacebookRestClient<T>longTemplate - the long template to store.actionLinks - the action links to store
FacebookException
@Deprecated
public java.lang.Long feed_registerTemplateBundle(java.lang.String template,
java.lang.String shortTemplate,
java.lang.String longTemplate)
throws FacebookException
IFacebookRestClient
feed_registerTemplateBundle in interface IFacebookRestClient<T>template - the template to store.shortTemplate - the short template to store.longTemplate - the long template to store.
FacebookException
public T profile_getFBML()
throws FacebookException
IFacebookRestClient
profile_getFBML in interface IFacebookRestClient<T>FacebookExceptionIFacebookRestClient.profile_getFBML(int, Long)
public T profile_getFBML(java.lang.Long userId)
throws FacebookException
IFacebookRestClient
profile_getFBML in interface IFacebookRestClient<T>userId - The user whose profile FBML is to be fetched, or the page ID in case of a Page. If not specified, defaults to the session user.
FacebookExceptionIFacebookRestClient.profile_getFBML(int, Long)
public T profile_getFBML(int type)
throws FacebookException
IFacebookRestClient
profile_getFBML in interface IFacebookRestClient<T>type - The type of profile box to retrieve. Specify 1 for the original style (wide and narrow column boxes), 2 for profile_main box. (Default value is 1.)
FacebookExceptionIFacebookRestClient.profile_getFBML(int, Long)
public T profile_getFBML(int type,
java.lang.Long userId)
throws FacebookException
IFacebookRestClient
profile_getFBML in interface IFacebookRestClient<T>type - The type of profile box to retrieve. Specify 1 for the original style (wide and narrow column boxes), 2 for profile_main box. (Default value is 1.)userId - The user whose profile FBML is to be fetched, or the page ID in case of a Page. If not specified, defaults to the session user.
FacebookException
public T profile_getInfo(java.lang.Long userId)
throws FacebookException
IFacebookRestClient
profile_getInfo in interface IFacebookRestClient<T>userId - the id of the user to get the info section for.
FacebookException
public T profile_getInfoOptions(java.lang.String field)
throws FacebookException
IFacebookRestClient
profile_getInfoOptions in interface IFacebookRestClient<T>field - the field to get the options for.
FacebookException
public void profile_setInfo(java.lang.Long userId,
java.lang.String title,
boolean textOnly,
java.util.List<ProfileInfoField> fields)
throws FacebookException
IFacebookRestClient
profile_setInfo in interface IFacebookRestClient<T>userId - the user to set the info section for.title - the title to use for the section.textOnly - set to true if your info fields are text only. set to false for thumbnail mode.fields - the fields to set.
FacebookException
public void profile_setInfoOptions(ProfileInfoField field)
throws FacebookException
IFacebookRestClient
profile_setInfoOptions in interface IFacebookRestClient<T>field - the field to set.
FacebookException
public boolean profile_setFBML(java.lang.CharSequence profileFbmlMarkup,
java.lang.CharSequence profileActionFbmlMarkup)
throws FacebookException
IFacebookRestClient
profile_setFBML in interface IFacebookRestClient<T>profileFbmlMarkup - the FBML for the profile boxprofileActionFbmlMarkup - the FBML for the profile actions
FacebookException
public boolean profile_setFBML(java.lang.CharSequence profileFbmlMarkup,
java.lang.CharSequence profileActionFbmlMarkup,
java.lang.Long profileId)
throws FacebookException
IFacebookRestClientprofileId. Refer to the FBML documentation for a
description of the markup and its role in various contexts.
profile_setFBML in interface IFacebookRestClient<T>profileFbmlMarkup - the FBML for the profile boxprofileActionFbmlMarkup - the FBML for the profile actionsprofileId - a page or user ID (null for the logged-in user)
FacebookException
public boolean profile_setFBML(java.lang.CharSequence profileFbmlMarkup,
java.lang.CharSequence profileActionFbmlMarkup,
java.lang.CharSequence mobileFbmlMarkup)
throws FacebookException
IFacebookRestClient
profile_setFBML in interface IFacebookRestClient<T>profileFbmlMarkup - the FBML for the profile boxprofileActionFbmlMarkup - the FBML for the profile actionsmobileFbmlMarkup - the FBML for mobile devices
FacebookException
public boolean profile_setFBML(java.lang.CharSequence profileFbmlMarkup,
java.lang.CharSequence profileActionFbmlMarkup,
java.lang.CharSequence mobileFbmlMarkup,
java.lang.Long profileId)
throws FacebookException
IFacebookRestClientprofileId. Refer to the FBML
documentation for a description of the markup and its role in various contexts.
profile_setFBML in interface IFacebookRestClient<T>profileFbmlMarkup - the FBML for the profile boxprofileActionFbmlMarkup - the FBML for the profile actionsmobileFbmlMarkup - the FBML for mobile devicesprofileId - a page or user ID (null for the logged-in user)
FacebookException
public boolean profile_setMobileFBML(java.lang.CharSequence fbmlMarkup)
throws FacebookException
IFacebookRestClient
profile_setMobileFBML in interface IFacebookRestClient<T>fbmlMarkup - refer to the FBML documentation for a description of the markup and its role in various contexts
FacebookException
public boolean profile_setMobileFBML(java.lang.CharSequence fbmlMarkup,
java.lang.Long profileId)
throws FacebookException
IFacebookRestClientprofileId on mobile devices.
profile_setMobileFBML in interface IFacebookRestClient<T>fbmlMarkup - refer to the FBML documentation for a description of the markup and its role in various contextsprofileId - a page or user ID (null for the logged-in user)
FacebookException
public boolean profile_setProfileActionFBML(java.lang.CharSequence fbmlMarkup)
throws FacebookException
IFacebookRestClient
profile_setProfileActionFBML in interface IFacebookRestClient<T>fbmlMarkup - refer to the FBML documentation for a description of the markup and its role in various contexts
FacebookException
public boolean profile_setProfileActionFBML(java.lang.CharSequence fbmlMarkup,
java.lang.Long profileId)
throws FacebookException
IFacebookRestClientprofileId.
profile_setProfileActionFBML in interface IFacebookRestClient<T>fbmlMarkup - refer to the FBML documentation for a description of the markup and its role in various contextsprofileId - a page or user ID (null for the logged-in user)
FacebookException
public boolean profile_setProfileFBML(java.lang.CharSequence fbmlMarkup)
throws FacebookException
IFacebookRestClient
profile_setProfileFBML in interface IFacebookRestClient<T>fbmlMarkup - refer to the FBML documentation for a description of the markup and its role in various contexts
FacebookException
public boolean profile_setProfileFBML(java.lang.CharSequence fbmlMarkup,
java.lang.Long profileId)
throws FacebookException
IFacebookRestClientprofileId.
profile_setProfileFBML in interface IFacebookRestClient<T>fbmlMarkup - refer to the FBML documentation for a description of the markup and its role in various contextsprofileId - a page or user ID (null for the logged-in user)
FacebookException
public boolean profile_setFBML(java.lang.Long userId,
java.lang.String profileFbml,
java.lang.String actionFbml,
java.lang.String mobileFbml)
throws FacebookException
profile_setFBML in interface IFacebookRestClient<T>FacebookExceptionIFacebookRestClient.profile_setFBML(Long, String, String, String, String)
public boolean profile_setFBML(java.lang.Long userId,
java.lang.String profileFbml,
java.lang.String actionFbml,
java.lang.String mobileFbml,
java.lang.String profileMain)
throws FacebookException
IFacebookRestClient
profile_setFBML in interface IFacebookRestClient<T>userId - The user ID for the user whose profile you are updating, or the page ID in case of a Page. If this parameter is not specified, then it defaults to the
session user. Note: This parameter applies only to Web applications and is required by them only if the session_key is not specified. Facebook returns
an error if this parameter is passed by a desktop application.profileFbml - The FBML intended for the application profile box that appears on the Boxes tab on the user's profile.actionFbml - The FBML intended for the user's profile actions. A profile action is the link under the user's profile picture that allows a user to take an action
with your application. Note: This attribute is being deprecated when the new profile design launches in July 2008, as there are no third party profile
action links on the new profile.mobileFbml - The FBML intended for mobile devices.profileMain - The FBML intended for the narrow profile box on the Wall and Info tabs of the user's profile. Note: This attribute applies only to the new profile
design that launched July 2008.
FacebookExceptionpublic void setServerUrl(java.lang.String newUrl)
IFacebookRestClient
setServerUrl in interface IFacebookRestClient<T>newUrl - the new URL to use, for example: "http://api.facebook.com/restserver.php"public java.net.URL getDefaultServerUrl()
getDefaultServerUrl in interface IFacebookRestClient<T>public void setDefaultServerUrl(java.net.URL newUrl)
setDefaultServerUrl in interface IFacebookRestClient<T>
public java.lang.Boolean liveMessage_send(java.lang.Long recipient,
java.lang.String eventName,
org.json.JSONObject message)
throws FacebookException
IFacebookRestClient
liveMessage_send in interface IFacebookRestClient<T>recipient - the id of the user to send the message to.eventName - the name associated with the FBJS handler you want to recieve your message.message - the JSON-object to send, the object will be passed to the FBJS handler that you have mapped to 'eventName'. See
http://wiki.developers.facebook.com/index.php/LiveMessage for details.
FacebookException
public T admin_getMetrics(java.util.Set<Metric> metrics,
java.util.Date start,
java.util.Date end,
long period)
throws FacebookException
IFacebookRestClient
admin_getMetrics in interface IFacebookRestClient<T>metrics - a set specifying the specific metrics to retrievestart - the starting date to retrieve data for (range must not exceed 30 days)end - the ending to to retrive data for (range must not exceed 30 days)period - a number specifying the desired period to group the metrics by, in seconds, Facebook currently only supports Metric.PERIOD_DAY, Metric.PERIOD_WEEK, and
Metric.PERIOD_MONTH
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Admin.getMetrics
public T admin_getMetrics(java.util.Set<Metric> metrics,
long start,
long end,
long period)
throws FacebookException
IFacebookRestClient
admin_getMetrics in interface IFacebookRestClient<T>metrics - a set specifying the specific metrics to retrievestart - the starting date to retrieve data for (range must not exceed 30 days), the accepted unit of time is milliseconds, NOT secondsend - the ending to to retrive data for (range must not exceed 30 days), the accepted unit of time is milliseconds, NOT secondsperiod - a number specifying the desired period to group the metrics by, in seconds, Facebook currently only supports Metric.PERIOD_DAY, Metric.PERIOD_WEEK, and
Metric.PERIOD_MONTH
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Admin.getMetrics
public boolean feed_deactivateTemplateBundleByID(java.lang.Long bundleId)
throws FacebookException
IFacebookRestClient
feed_deactivateTemplateBundleByID in interface IFacebookRestClient<T>bundleId - the id of the bundle to deactivate.
FacebookException
public void notifications_send(java.util.Collection<java.lang.Long> recipientIds,
java.lang.String notification,
boolean isAppToUser)
throws FacebookException
IFacebookRestClient
notifications_send in interface IFacebookRestClient<T>recipientIds - the ids of the users to send the notification to.notification - the notification to send.
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Notifications.send
public java.lang.Boolean feed_publishUserAction(java.lang.Long bundleId,
java.util.Map<java.lang.String,java.lang.String> templateData,
java.util.List<IFeedImage> images,
java.util.List<java.lang.Long> targetIds,
java.lang.String bodyGeneral,
int storySize)
throws FacebookException
IFacebookRestClient
feed_publishUserAction in interface IFacebookRestClient<T>bundleId - the template bundle-id to use to render the feed.templateData - a map of name-value pairs to substitute into the template being rendered.images - the images to associate with this feed entrytargetIds - the ids of individuals that are the target of this action.bodyGeneral - additional markup to include in the feed story.storySize - story size to use. valid values are 1, 2 or 4.
FacebookExceptionprotected static void disconnect(java.net.HttpURLConnection conn)
protected static void close(java.io.Closeable c)
protected static java.lang.RuntimeException runtimeException(java.lang.Exception ex)
protected static void printDom(org.w3c.dom.Node n,
java.lang.String prefix,
java.lang.StringBuilder sb)
n - the parent node to start printing fromprefix - string to append to output, should not be null
protected static Pair<java.lang.String,java.lang.CharSequence> newPair(java.lang.String name,
java.lang.Object value)
@Deprecated
protected static Pair<java.lang.String,java.lang.CharSequence> newPair(java.lang.String name,
boolean value)
protected static Pair<java.lang.String,java.lang.CharSequence> newPair10(java.lang.String name,
boolean value)
protected static Pair<java.lang.String,java.lang.CharSequence> newPairTF(java.lang.String name,
boolean value)
protected static Pair<java.lang.String,java.lang.CharSequence> newPair(java.lang.String name,
java.lang.CharSequence value)
protected static Pair<java.lang.String,java.lang.CharSequence> newPair(java.lang.String name,
java.lang.Long value)
protected static Pair<java.lang.String,java.lang.CharSequence> newPair(java.lang.String name,
java.lang.Integer value)
protected static boolean addParam(java.lang.String name,
java.lang.Long value,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> params)
protected static boolean addParamIfNotBlank(java.lang.String name,
java.lang.Long value,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> params)
protected static boolean addParamSecondsIfNotBlank(java.lang.String name,
java.util.Date value,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> params)
protected static boolean addParamIfNotBlankZero(java.lang.String name,
java.lang.Long value,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> params)
protected static boolean addParamDelimitIfNotBlankEmpty(java.lang.String name,
java.lang.Iterable value,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> params)
protected static boolean addParam(java.lang.String name,
java.lang.Object value,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> params)
protected static boolean addParam(java.lang.String name,
java.lang.CharSequence value,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> params)
protected static boolean addParamIfNotBlank(java.lang.String name,
java.lang.CharSequence value,
java.util.Collection<Pair<java.lang.String,java.lang.CharSequence>> params)
protected static java.lang.String toString(java.lang.CharSequence cs)
protected static org.json.JSONObject toJson(java.util.Map<java.lang.String,java.lang.String> map)
protected static org.json.JSONArray toJsonListOfStrings(java.util.Collection<java.lang.String> list)
protected static org.json.JSONArray toJsonListOfMaps(java.util.Collection<java.util.Map<java.lang.String,java.lang.String>> listOfMaps)
protected boolean extractBoolean(T result)
result -
protected abstract int extractInt(T result)
result -
protected abstract java.lang.Long extractLong(T result)
result -
protected abstract java.net.URL extractURL(T result)
throws java.io.IOException
result -
java.io.IOExceptionprotected abstract java.lang.String extractString(T result)
result -
public T events_get(java.lang.Long userId,
java.util.Collection<java.lang.Long> eventIds,
java.lang.Long startTime,
java.lang.Long endTime)
throws FacebookException
IFacebookRestClient
events_get in interface IFacebookRestClient<T>userId - Filter by events associated with a user with this uid.eventIds - Filter by this list of event IDs. This is a comma-separated list of event IDs.startTime - Filter with this UTC as lower bound. A missing or zero parameter indicates no lower bound.endTime - Filter with this UTC as upper bound. A missing or zero parameter indicates no upper bound.
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Events.get
public T events_get(java.lang.Long userId,
java.util.Collection<java.lang.Long> eventIds,
java.lang.Long startTime,
java.lang.Long endTime,
java.lang.String rsvp_status)
throws FacebookException
IFacebookRestClient
events_get in interface IFacebookRestClient<T>userId - Filter by events associated with a user with this uid.eventIds - Filter by this list of event IDs. This is a comma-separated list of event IDs.startTime - Filter with this UTC as lower bound. A missing or zero parameter indicates no lower bound.endTime - Filter with this UTC as upper bound. A missing or zero parameter indicates no upper bound.rsvp_status - Filter by this RSVP status. The RSVP status should be one of the following strings: attending, unsure, declined, not_replied
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Events.get
public T events_getMembers(java.lang.Long eventId)
throws FacebookException
IFacebookRestClient
events_getMembers in interface IFacebookRestClient<T>eventId - The event ID.
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Events.getMembers
public java.lang.Long events_create(java.util.Map<java.lang.String,java.lang.String> event_info)
throws FacebookException
IFacebookRestClient
events_create in interface IFacebookRestClient<T>event_info - The event information. You must pass the following parameters:
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Events.create
public boolean events_edit(java.lang.Long eid,
java.util.Map<java.lang.String,java.lang.String> event_info)
throws FacebookException
IFacebookRestClient
events_edit in interface IFacebookRestClient<T>eid - The event ID.
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Events.edit
public boolean events_cancel(java.lang.Long eid,
java.lang.String cancel_message)
throws FacebookException
IFacebookRestClient
events_cancel in interface IFacebookRestClient<T>eid - The event ID.cancel_message - The message sent explaining why the event was canceled. You can pass an empty string if you don't want to provide an explanation.
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Events.cancel
public boolean events_rsvp(java.lang.Long eid,
java.lang.String rsvp_status)
throws FacebookException
IFacebookRestClient
events_rsvp in interface IFacebookRestClient<T>eid - The event ID.rsvp_status - The user's RSVP status. Specify attending, unsure, or declined.
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Events.rsvp
public boolean sms_canSend()
throws FacebookException
IFacebookRestClient
sms_canSend in interface IFacebookRestClient<T>FacebookException - if an error happens when executing the API call.
public boolean sms_canSend(java.lang.Long userId)
throws FacebookException
IFacebookRestClient
sms_canSend in interface IFacebookRestClient<T>userId - the UID of the user to check permissions for
FacebookException - if an error happens when executing the API call.
public java.lang.Integer sms_send(java.lang.String message,
java.lang.Integer smsSessionId,
boolean makeNewSession)
throws FacebookException
IFacebookRestClient
sms_send in interface IFacebookRestClient<T>message - the message to send.smsSessionId - the SMS session id to use, note that that is distinct from the user's facebook session id. It is used to allow applications to keep track of individual
SMS conversations/threads for a single user. Specify null if you do not want/need to use a session for the current message.makeNewSession - set to true to request that Facebook allocate a new SMS session id for this message. The allocated id will be returned as the result of this API call.
You should only set this to true if you are passing a null 'smsSessionId' value. Otherwise you already have a SMS session id, and do not need a new one.
FacebookException - if an error happens when executing the API call.
public java.lang.Integer sms_send(java.lang.Long userId,
java.lang.String message,
java.lang.Integer smsSessionId,
boolean makeNewSession)
throws FacebookException
IFacebookRestClient
sms_send in interface IFacebookRestClient<T>userId - the id of the user to send the message to.message - the message to send.smsSessionId - the SMS session id to use, note that that is distinct from the user's facebook session id. It is used to allow applications to keep track of individual
SMS conversations/threads for a single user. Specify null if you do not want/need to use a session for the current message.makeNewSession - set to true to request that Facebook allocate a new SMS session id for this message. The allocated id will be returned as the result of this API call.
You should only set this to true if you are passing a null 'smsSessionId' value. Otherwise you already have a SMS session id, and do not need a new one.
FacebookException - if an error happens when executing the API call.
public void sms_sendMessage(java.lang.Long userId,
java.lang.CharSequence message)
throws FacebookException
IFacebookRestClientuserId. The SMS extended permission is required for success.
sms_sendMessage in interface IFacebookRestClient<T>userId - a user IDmessage - the message to be sent via SMS
FacebookException - in case of errorFacebookExtendedPerm.SMS,
Developers Wiki: Mobile: Application Generated Messages,
Developers Wiki: Mobile: Workflow
public int sms_sendMessageWithSession(java.lang.Long userId,
java.lang.CharSequence message)
throws FacebookException
IFacebookRestClientuserId, with the expectation that the user will reply. The SMS extended permission is required
for success. The returned mobile session ID can be stored and used in #sms_sendResponse when the user replies.
sms_sendMessageWithSession in interface IFacebookRestClient<T>userId - a user IDmessage - the message to be sent via SMS
#sms_sendResponse)
FacebookException - in case of error, e.g. SMS is not enabledFacebookExtendedPerm.SMS,
Developers Wiki: Mobile: Application Generated Messages,
Developers Wiki: Mobile: Workflow
public T connect_registerUsers(java.util.Collection<java.util.Map<java.lang.String,java.lang.String>> accounts)
throws FacebookException
IFacebookRestClient
connect_registerUsers in interface IFacebookRestClient<T>accounts - An array of up to 1,000 arrays, or "maps," where each map represent a connected account. Each map can have the following properties:
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Connect.registerUsers
public T connect_unregisterUsers(java.util.Collection<java.lang.String> email_hashes)
throws FacebookException
IFacebookRestClient
connect_unregisterUsers in interface IFacebookRestClient<T>email_hashes - An array of email_hashes to unregister.
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Connect.unregisterUsers
public int connect_getUnconnectedFriendsCount()
throws FacebookException
IFacebookRestClient
connect_getUnconnectedFriendsCount in interface IFacebookRestClient<T>FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Connect.getUnconnectedFriendsCount
public T photos_get(java.lang.Iterable<java.lang.Long> photoIds)
throws FacebookException
IFacebookRestClient
photos_get in interface IFacebookRestClient<T>photoIds - retrieve from this list of photos (optional)
FacebookException#photos_get(Long, Long, Collection),
Developers Wiki: Photos.get
public T photos_get(java.lang.Long subjId,
java.lang.Long albumId)
throws FacebookException
IFacebookRestClient
photos_get in interface IFacebookRestClient<T>subjId - retrieve from photos associated with this user (optional).albumId - retrieve from photos from this album (optional)
FacebookException#photos_get(Long, Long, Collection),
Developers Wiki: Photos.get
public T photos_get(java.lang.Long subjId,
java.lang.Iterable<java.lang.Long> photoIds)
throws FacebookException
IFacebookRestClient
photos_get in interface IFacebookRestClient<T>subjId - retrieve from photos associated with this user (optional).photoIds - retrieve from this list of photos (optional)
FacebookException#photos_get(Long, Long, Collection),
Developers Wiki: Photos.get
public T photos_get(java.lang.Long subjId)
throws FacebookException
IFacebookRestClient
photos_get in interface IFacebookRestClient<T>subjId - retrieve from photos associated with this user (optional).
FacebookException#photos_get(Long, Long, Collection),
Developers Wiki: Photos.get
public T photos_get(java.lang.Long subjId,
java.lang.Long albumId,
java.lang.Iterable<java.lang.Long> photoIds)
throws FacebookException
IFacebookRestClient
photos_get in interface IFacebookRestClient<T>subjId - retrieve from photos associated with this user (optional).albumId - retrieve from photos from this album (optional)photoIds - retrieve from this list of photos (optional)
FacebookException
public T photos_getTags(java.lang.Iterable<java.lang.Long> photoIds)
throws FacebookException
IFacebookRestClient
photos_getTags in interface IFacebookRestClient<T>photoIds - The list of photos from which to extract photo tags.
FacebookException
public boolean photos_addTag(java.lang.Long photoId,
java.lang.CharSequence tagText,
java.lang.Double xPct,
java.lang.Double yPct)
throws FacebookException
IFacebookRestClient
photos_addTag in interface IFacebookRestClient<T>photoId - The photo id of the photo to be tagged.tagText - The text of the tag.xPct - The horizontal position of the tag, as a percentage from 0 to 100, from the left of the photo.yPct - The list of photos from which to extract photo tags.
FacebookException
public T photos_createAlbum(java.lang.String albumName)
throws FacebookException
IFacebookRestClient
photos_createAlbum in interface IFacebookRestClient<T>albumName - The list of photos from which to extract photo tags.
FacebookException
public boolean photos_addTag(java.lang.Long photoId,
java.lang.Long taggedUserId,
java.lang.Double xPct,
java.lang.Double yPct)
throws FacebookException
IFacebookRestClient
photos_addTag in interface IFacebookRestClient<T>photoId - The photo id of the photo to be tagged.taggedUserId - The list of photos from which to extract photo tags.xPct - The horizontal position of the tag, as a percentage from 0 to 100, from the left of the photo.yPct - The vertical position of the tag, as a percentage from 0 to 100, from the top of the photo.
FacebookException
public T photos_addTags(java.lang.Long photoId,
java.lang.Iterable<PhotoTag> tags)
throws FacebookException
IFacebookRestClient
photos_addTags in interface IFacebookRestClient<T>photoId - The photo id of the photo to be tagged.tags - A list of PhotoTags.
FacebookException
public T photos_createAlbum(java.lang.String name,
java.lang.String description,
java.lang.String location)
throws FacebookException
IFacebookRestClient
photos_createAlbum in interface IFacebookRestClient<T>name - The album name.description - The album description (optional).location - The album location (optional).
FacebookException
public T photos_getAlbums(java.lang.Iterable<java.lang.Long> albumIds)
throws FacebookException
IFacebookRestClient
photos_getAlbums in interface IFacebookRestClient<T>albumIds - the ids of albums whose metadata is to be retrieved
FacebookException
public T photos_getAlbums(java.lang.Long userId)
throws FacebookException
IFacebookRestClient
photos_getAlbums in interface IFacebookRestClient<T>userId - (optional) the id of the albums' owner (optional)
FacebookException
public T photos_getAlbums(java.lang.Long userId,
java.lang.Iterable<java.lang.Long> albumIds)
throws FacebookException
IFacebookRestClient
photos_getAlbums in interface IFacebookRestClient<T>userId - (optional) the id of the albums' owner (optional)albumIds - (optional) the ids of albums whose metadata is to be retrieved
FacebookException
public T photos_getByAlbum(java.lang.Long albumId,
java.lang.Iterable<java.lang.Long> photoIds)
throws FacebookException
IFacebookRestClient
photos_getByAlbum in interface IFacebookRestClient<T>albumId - retrieve from photos from this album (optional)photoIds - retrieve from this list of photos (optional)
FacebookException#photos_get(Integer, Long, Collection),
Developers Wiki: Photos.get
public T photos_getByAlbum(java.lang.Long albumId)
throws FacebookException
IFacebookRestClient
photos_getByAlbum in interface IFacebookRestClient<T>albumId - retrieve from photos from this album (optional)
FacebookException#photos_get(Integer, Long, Collection),
Developers Wiki: Photos.get
public boolean photos_addTag(java.lang.Long photoId,
java.lang.Long taggedUserId,
java.lang.Double pct,
java.lang.Double pct2,
java.lang.Long userId)
throws FacebookException
IFacebookRestClient
photos_addTag in interface IFacebookRestClient<T>photoId - The photo id of the photo to be tagged.taggedUserId - The list of photos from which to extract photo tags.pct - The horizontal position of the tag, as a percentage from 0 to 100, from the left of the photo.pct2 - The vertical position of the tag, as a percentage from 0 to 100, from the top of the photo.userId - the user tagging the photo.
FacebookException
public boolean photos_addTag(java.lang.Long photoId,
java.lang.CharSequence tagText,
java.lang.Double pct,
java.lang.Double pct2,
java.lang.Long userId)
throws FacebookException
IFacebookRestClient
photos_addTag in interface IFacebookRestClient<T>photoId - The photo id of the photo to be tagged.tagText - The text of the tag.pct - The horizontal position of the tag, as a percentage from 0 to 100, from the left of the photo.pct2 - The list of photos from which to extract photo tags.userId - the user tagging the photo.
FacebookException
public T photos_createAlbum(java.lang.String albumName,
java.lang.Long userId)
throws FacebookException
IFacebookRestClient
photos_createAlbum in interface IFacebookRestClient<T>albumName - The list of photos from which to extract photo tags.userId - the id of the user creating the album.
FacebookException
public T photos_createAlbum(java.lang.String name,
java.lang.String description,
java.lang.String location,
java.lang.Long userId)
throws FacebookException
IFacebookRestClient
photos_createAlbum in interface IFacebookRestClient<T>name - The album name.description - The album description (optional).location - The album location (optional).userId - the id of the user creating the album.
FacebookException
public T photos_addTags(java.lang.Long photoId,
java.lang.Iterable<PhotoTag> tags,
java.lang.Long userId)
throws FacebookException
IFacebookRestClient
photos_addTags in interface IFacebookRestClient<T>photoId - The photo id of the photo to be tagged.tags - A list of PhotoTags.userId - the id of the user adding the tags.
FacebookException
public T photos_upload(java.io.File photo)
throws FacebookException
IFacebookRestClient
photos_upload in interface IFacebookRestClient<T>photo - an image file
FacebookException
public T photos_upload(java.io.File photo,
java.lang.String caption)
throws FacebookException
IFacebookRestClient
photos_upload in interface IFacebookRestClient<T>photo - an image filecaption - a description of the image contents
FacebookException
public T photos_upload(java.io.File photo,
java.lang.Long albumId)
throws FacebookException
IFacebookRestClient
photos_upload in interface IFacebookRestClient<T>photo - an image filealbumId - the album into which the photo should be uploaded
FacebookException
public T photos_upload(java.io.File photo,
java.lang.String caption,
java.lang.Long albumId)
throws FacebookException
IFacebookRestClient
photos_upload in interface IFacebookRestClient<T>photo - an image filecaption - a description of the image contentsalbumId - the album into which the photo should be uploaded
FacebookException
public T photos_upload(java.lang.Long userId,
java.io.File photo)
throws FacebookException
IFacebookRestClient
photos_upload in interface IFacebookRestClient<T>userId - the id of the user uploading the photophoto - an image file
FacebookException
public T photos_upload(java.lang.Long userId,
java.io.File photo,
java.lang.String caption)
throws FacebookException
IFacebookRestClient
photos_upload in interface IFacebookRestClient<T>userId - the id of the user uploading the photophoto - an image filecaption - a description of the image contents
FacebookException
public T photos_upload(java.lang.Long userId,
java.io.File photo,
java.lang.Long albumId)
throws FacebookException
IFacebookRestClient
photos_upload in interface IFacebookRestClient<T>userId - the id of the user uploading the photophoto - an image filealbumId - the album into which the photo should be uploaded
FacebookException
public T photos_upload(java.lang.Long userId,
java.io.File photo,
java.lang.String caption,
java.lang.Long albumId)
throws FacebookException
IFacebookRestClient
photos_upload in interface IFacebookRestClient<T>userId - the id of the user uploading the photophoto - an image filecaption - a description of the image contentsalbumId - the album into which the photo should be uploaded
FacebookException
public T photos_upload(java.lang.Long userId,
java.lang.String caption,
java.lang.Long albumId,
java.lang.String fileName,
java.io.InputStream fileStream)
throws FacebookException
IFacebookRestClient
photos_upload in interface IFacebookRestClient<T>userId - the id of the user uploading the photocaption - a description of the image contentsalbumId - the album into which the photo should be uploaded
FacebookException
public T notifications_sendEmail(java.util.Collection<java.lang.Long> recipients,
java.lang.CharSequence subject,
java.lang.CharSequence text,
java.lang.CharSequence fbml)
throws FacebookException
IFacebookRestClient
notifications_sendEmail in interface IFacebookRestClient<T>recipients - the uid's of the users to send to.subject - the subject of the email message.text - a plaintext version of the email to send.fbml - an FBML version of the email to send, the fbml parameter is a stripped-down set of FBML that allows only tags that result in text, links and linebreaks.
FacebookException - if an error happens when executing the API call.
public T notifications_sendFbmlEmail(java.util.Collection<java.lang.Long> recipients,
java.lang.String subject,
java.lang.String fbml)
throws FacebookException
IFacebookRestClient
notifications_sendFbmlEmail in interface IFacebookRestClient<T>recipients - the uid's of the users to send to.subject - the subject of the email message.fbml - the FBML version of the email to send, the fbml parameter is a stripped-down set of FBML that allows only tags that result in text, links and
linebreaks.
FacebookException - if an error happens when executing the API call.
public T notifications_sendTextEmail(java.util.Collection<java.lang.Long> recipients,
java.lang.String subject,
java.lang.String email)
throws FacebookException
IFacebookRestClient
notifications_sendTextEmail in interface IFacebookRestClient<T>recipients - the uid's of the users to send to.subject - the subject of the email message.email - a plaintext version of the email to send.
FacebookException - if an error happens when executing the API call.
public T notifications_sendEmailToCurrentUser(java.lang.String subject,
java.lang.String email,
java.lang.String fbml)
throws FacebookException
IFacebookRestClient
notifications_sendEmailToCurrentUser in interface IFacebookRestClient<T>subject - the subject of the email message.email - a plaintext version of the email to send.fbml - an FBML version of the email to send, the fbml parameter is a stripped-down set of FBML that allows only tags that result in text, links and linebreaks.
FacebookException - if an error happens when executing the API call.
public T notifications_sendFbmlEmailToCurrentUser(java.lang.String subject,
java.lang.String fbml)
throws FacebookException
IFacebookRestClient
notifications_sendFbmlEmailToCurrentUser in interface IFacebookRestClient<T>subject - the subject of the email message.fbml - the FBML version of the email to send, the fbml parameter is a stripped-down set of FBML that allows only tags that result in text, links and
linebreaks.
FacebookException - if an error happens when executing the API call.
public T notifications_sendTextEmailToCurrentUser(java.lang.String subject,
java.lang.String email)
throws FacebookException
IFacebookRestClient
notifications_sendTextEmailToCurrentUser in interface IFacebookRestClient<T>subject - the subject of the email message.email - a plaintext version of the email to send.
FacebookException - if an error happens when executing the API call.
@Deprecated
public java.lang.String notifications_sendEmailStr(java.util.Collection<java.lang.Long> recipients,
java.lang.CharSequence subject,
java.lang.CharSequence fbml,
java.lang.CharSequence text)
throws FacebookException
IFacebookRestClientfbml or text must be specified.
notifications_sendEmailStr in interface IFacebookRestClient<T>recipients - up to 100 user ids to which the message is to be sentsubject - the subject of the notification email (optional)fbml - markup to be sent to the specified users via email; only a stripped-down set of FBML tags that result in text, links and linebreaks is allowedtext - the plain text to send to the specified users via email
FacebookException
@Deprecated
public java.lang.String notifications_sendEmail(java.util.Collection<java.lang.Long> recipients,
java.lang.CharSequence subject,
java.lang.CharSequence fbml)
throws FacebookException
IFacebookRestClient
notifications_sendEmail in interface IFacebookRestClient<T>recipients - up to 100 user ids to which the message is to be sentsubject - the subject of the notification email (optional)fbml - markup to be sent to the specified users via email; only a stripped-down set of FBML that allows only tags that result in text, links and linebreaks is
allowed
FacebookException
@Deprecated
public java.lang.String notifications_sendEmailPlain(java.util.Collection<java.lang.Long> recipients,
java.lang.CharSequence subject,
java.lang.CharSequence text)
throws FacebookException
IFacebookRestClient
notifications_sendEmailPlain in interface IFacebookRestClient<T>recipients - up to 100 user ids to which the message is to be sentsubject - the subject of the notification email (optional)text - the plain text to send to the specified users via email
FacebookException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||