|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.code.facebookapi.ExtensibleClient<org.w3c.dom.Document>
com.google.code.facebookapi.FacebookXmlRestClient
public class FacebookXmlRestClient
A FacebookRestClient that uses the XML result format. This means results from calls to the Facebook API are returned as XML and transformed into instances of
Document.
| Field Summary | |
|---|---|
protected org.w3c.dom.Document |
cacheFriendsList
|
protected static org.apache.commons.logging.Log |
log
|
protected boolean |
namespaceAware
|
| Fields inherited from class com.google.code.facebookapi.ExtensibleClient |
|---|
_apiKey, _isDesktop, _readTimeout, _secret, _serverUrl, _timeout, BATCH_LIMIT, batchMode, cacheAppAdded, cacheAppUser, cacheSessionExpires, cacheSessionKey, cacheSessionSecret, cacheUserId, CRLF, HTTPS_SERVER_URL, JAXB_CONTEXT, MARKETPLACE_STATUS_DEFAULT, MARKETPLACE_STATUS_NOT_SUCCESS, MARKETPLACE_STATUS_SUCCESS, permissionsApiKey, PREF, queries, rawResponse, SERVER_URL, 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 | |
|---|---|
FacebookXmlRestClient(java.lang.String apiKey,
java.lang.String secret)
|
|
FacebookXmlRestClient(java.lang.String apiKey,
java.lang.String secret,
int connectionTimeout)
|
|
FacebookXmlRestClient(java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey)
|
|
FacebookXmlRestClient(java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey,
int connectionTimeout)
|
|
FacebookXmlRestClient(java.lang.String serverAddr,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey)
|
|
FacebookXmlRestClient(java.lang.String serverAddr,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey,
int connectionTimeout)
|
|
FacebookXmlRestClient(java.net.URL serverUrl,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey)
|
|
FacebookXmlRestClient(java.net.URL serverUrl,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey,
int connectionTimeout)
|
|
FacebookXmlRestClient(java.net.URL serverUrl,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey,
int connectionTimeout,
int readTimeout)
|
|
| Method Summary | |
|---|---|
java.lang.String |
admin_getAppPropertiesAsString(java.util.Collection<ApplicationProperty> properties)
Retrieve application properties. |
java.lang.String |
auth_getSession(java.lang.String authToken)
Call this function to retrieve the session information after your user has logged in. |
java.util.List<? extends java.lang.Object> |
executeBatch(boolean serial)
Executes a batch of queries. |
protected int |
extractInt(org.w3c.dom.Document doc)
Extracts an Integer from a document that consists of an Integer only. |
protected java.lang.Long |
extractLong(org.w3c.dom.Document doc)
Extracts a Long from a document that consists of a Long only. |
static java.lang.String |
extractNodeString(org.w3c.dom.Node d)
|
java.lang.String |
extractString(org.w3c.dom.Document d)
Extracts a String from a T consisting entirely of a String. |
protected java.net.URL |
extractURL(org.w3c.dom.Document doc)
Extracts a URL from a document that consists of a URL only. |
org.w3c.dom.Document |
friends_get()
Retrieves the friends of the currently logged in user. |
org.w3c.dom.Document |
getCacheFriendsList()
Return the object's 'friendsList' property. |
java.lang.String |
getResponseFormat()
The response format in which results to FacebookMethod calls are returned |
boolean |
isNamespaceAware()
|
java.util.List<Listing> |
marketplace_getListings(java.util.List<java.lang.Long> listingIds,
java.util.List<java.lang.Long> uids)
Retrieve listings from the marketplace. |
java.util.List<java.lang.String> |
marketplace_getSubCategories()
Return a list of all valid Marketplace subcategories. |
java.util.List<Listing> |
marketplace_search(MarketListingCategory category,
MarketListingSubcategory subcategory,
java.lang.String searchTerm)
Search the marketplace listings by category, subcategory, and keyword. |
protected org.w3c.dom.Document |
parseCallResult(java.io.InputStream data,
IFacebookMethod method)
Parses the result of an API call into a T. |
void |
printDom(org.w3c.dom.Node n,
java.lang.String prefix)
Prints out the DOM tree. |
void |
setCacheFriendsList(java.util.List<java.lang.Long> ids)
Set/override the list of friends stored in the client. |
void |
setNamespaceAware(boolean v)
|
static org.w3c.dom.Document |
toFriendsGetResponse(java.util.List<java.lang.Long> ids)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.commons.logging.Log log
protected boolean namespaceAware
protected org.w3c.dom.Document cacheFriendsList
| Constructor Detail |
|---|
public FacebookXmlRestClient(java.lang.String apiKey,
java.lang.String secret)
public FacebookXmlRestClient(java.lang.String apiKey,
java.lang.String secret,
int connectionTimeout)
public FacebookXmlRestClient(java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey)
public FacebookXmlRestClient(java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey,
int connectionTimeout)
public FacebookXmlRestClient(java.lang.String serverAddr,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey)
throws java.net.MalformedURLException
java.net.MalformedURLException
public FacebookXmlRestClient(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
public FacebookXmlRestClient(java.net.URL serverUrl,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey)
public FacebookXmlRestClient(java.net.URL serverUrl,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey,
int connectionTimeout)
public FacebookXmlRestClient(java.net.URL serverUrl,
java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey,
int connectionTimeout,
int readTimeout)
| Method Detail |
|---|
public boolean isNamespaceAware()
public void setNamespaceAware(boolean v)
public java.lang.String getResponseFormat()
getResponseFormat in class ExtensibleClient<org.w3c.dom.Document>public java.lang.String extractString(org.w3c.dom.Document d)
extractString in class ExtensibleClient<org.w3c.dom.Document>
public java.lang.String auth_getSession(java.lang.String authToken)
throws FacebookException
auth_getSession in interface IFacebookRestClient<org.w3c.dom.Document>auth_getSession in class ExtensibleClient<org.w3c.dom.Document>authToken - the token returned by auth_createToken or passed back to your callback_url.
FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Auth.getSession
protected org.w3c.dom.Document parseCallResult(java.io.InputStream data,
IFacebookMethod method)
throws FacebookException,
java.io.IOException
ExtensibleClient
parseCallResult in class ExtensibleClient<org.w3c.dom.Document>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
protected java.net.URL extractURL(org.w3c.dom.Document doc)
throws java.io.IOException
extractURL in class ExtensibleClient<org.w3c.dom.Document>doc -
java.io.IOExceptionprotected int extractInt(org.w3c.dom.Document doc)
extractInt in class ExtensibleClient<org.w3c.dom.Document>doc -
protected java.lang.Long extractLong(org.w3c.dom.Document doc)
extractLong in class ExtensibleClient<org.w3c.dom.Document>doc -
public void printDom(org.w3c.dom.Node n,
java.lang.String prefix)
public java.util.List<Listing> marketplace_getListings(java.util.List<java.lang.Long> listingIds,
java.util.List<java.lang.Long> uids)
throws FacebookException
IFacebookRestClient
listingIds - the ids of listings to filter by, only listings matching the specified ids will be returned.uids - the ids of users to filter by, only listings submitted by those users will be returned.
FacebookException - if an error happens when executing the API call.
public java.util.List<java.lang.String> marketplace_getSubCategories()
throws FacebookException
IFacebookRestClient
FacebookException - if an error happens when executing the API call.
public java.util.List<Listing> marketplace_search(MarketListingCategory category,
MarketListingSubcategory subcategory,
java.lang.String searchTerm)
throws FacebookException
IFacebookRestClient
category - the category to search in, optional (unless subcategory is specified).subcategory - the subcategory to search in, optional.searchTerm - the keyword to search for, optional.
FacebookException - if an error happens when executing the API call.
public java.lang.String admin_getAppPropertiesAsString(java.util.Collection<ApplicationProperty> properties)
throws FacebookException
IFacebookRestClient
properties - a collection indicating the properties you are interested in retrieving.
FacebookException
public java.util.List<? extends java.lang.Object> executeBatch(boolean serial)
throws FacebookException
serial - set to true, and your batch queries will always execute serially, in the same order in which your specified them. If set to false, the Facebook API
server may execute your queries in parallel and/or out of order in order to improve performance.
FacebookException
java.io.IOExceptionpublic static java.lang.String extractNodeString(org.w3c.dom.Node d)
public org.w3c.dom.Document getCacheFriendsList()
public void setCacheFriendsList(java.util.List<java.lang.Long> ids)
friendsList - the new list to use.public static org.w3c.dom.Document toFriendsGetResponse(java.util.List<java.lang.Long> ids)
public org.w3c.dom.Document friends_get()
throws FacebookException
IFacebookRestClient
friends_get in interface IFacebookRestClient<org.w3c.dom.Document>friends_get in class ExtensibleClient<org.w3c.dom.Document>FacebookExceptionhttp://wiki.developers.facebook.com/index.php/Friends.get
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||