com.google.code.facebookapi
Class FacebookJsonRestClientBase
java.lang.Object
com.google.code.facebookapi.BaseAdapter
com.google.code.facebookapi.SpecificReturnTypeAdapter<java.lang.Object>
com.google.code.facebookapi.FacebookJsonRestClientBase
- All Implemented Interfaces:
- IFacebookRestClient<java.lang.Object>
- Direct Known Subclasses:
- FacebookJsonRestClient
public abstract class FacebookJsonRestClientBase
- extends SpecificReturnTypeAdapter<java.lang.Object>
A FacebookRestClient that uses the JSON result format. This means results from calls to the Facebook API are returned as JSON and
transformed into Java Object's.
|
Field Summary |
protected static org.apache.commons.logging.Log |
log
|
|
Method Summary |
java.util.List<? extends java.lang.Object> |
executeBatch(boolean serial)
Executes a batch of queries. |
protected
|
parseCallResult(java.lang.Class<T> type,
java.lang.Object rawResponse)
|
| Methods inherited from class com.google.code.facebookapi.SpecificReturnTypeAdapter |
admin_getAllocation, admin_getAllocation, admin_getAllocation, admin_getAllocation, admin_getAppProperties, admin_getAppPropertiesAsSet, admin_getAppPropertiesAsString, admin_getAppPropertiesMap, admin_getNotificationAllocation, admin_getRequestAllocation, admin_setAppProperties, admin_setAppProperties, auth_createToken, auth_expireSession, auth_getSession, auth_getSession, auth_promoteSession, auth_revokeAuthorization, auth_revokeExtendedPermission, auth_revokeExtendedPermission, connect_getUnconnectedFriendsCount, dashboard_addGlobalNews, dashboard_addGlobalNews, dashboard_clearGlobalNews, dashboard_clearGlobalNews, dashboard_multiIncrementCount, dashboard_publishActivity, dashboard_publishActivity, data_createObject, data_getAssociatedObjectCount, data_getUserPreference, data_setCookie, data_setCookie, data_setCookie, data_setCookie, data_setCookie, data_setCookie, data_setCookie, data_setCookie, events_cancel, events_create, events_edit, events_rsvp, fbml_refreshImgSrc, fbml_refreshImgSrc, fbml_refreshRefUrl, fbml_refreshRefUrl, fbml_setRefHandle, feed_deactivateTemplateBundleByID, feed_publishTemplatizedAction, feed_publishTemplatizedAction, feed_publishTemplatizedAction, feed_publishTemplatizedAction, feed_publishTemplatizedAction, feed_publishTemplatizedAction, feed_publishTemplatizedAction, feed_PublishTemplatizedAction, feed_publishUserAction, feed_publishUserAction, feed_publishUserAction, feed_registerTemplateBundle, feed_registerTemplateBundle, feed_registerTemplateBundle, feed_registerTemplateBundle, feed_registerTemplateBundle, getCacheAppUser, getCacheSessionExpires, getCacheSessionKey, getCacheUserId, intl_uploadNativeStrings, isDesktop, links_post, liveMessage_send, notifications_send, notifications_send, notifications_send, notifications_send, notifications_sendEmail, notifications_sendEmail, notifications_sendEmailPlain, notifications_sendEmailStr, notifications_sendEmailToCurrentUser, notifications_sendFbmlEmail, notifications_sendFbmlEmailToCurrentUser, notifications_sendTextEmail, notifications_sendTextEmailToCurrentUser, pages_isAdmin, pages_isAppAdded, pages_isFan, pages_isFan, permissions_grantApiAccess, permissions_grantFullApiAccess, permissions_revokeApiAccess, photos_addTag, photos_addTag, photos_addTag, photos_addTag, profile_setFBML, profile_setFBML, profile_setFBML, profile_setFBML, profile_setFBML, profile_setFBML, profile_setMobileFBML, profile_setMobileFBML, profile_setProfileActionFBML, profile_setProfileActionFBML, profile_setProfileFBML, profile_setProfileFBML, sms_canSend, sms_canSend, sms_send, sms_send, sms_sendMessageWithSession, stream_addComment, stream_addLike, stream_publish, stream_remove, stream_removeComment, stream_removeLike, users_clearStatus, users_getLoggedInUser, users_hasAppPermission, users_hasAppPermission, users_isAppUser, users_isAppUser, users_setStatus, users_setStatus, users_setStatus, users_setStatus, users_setStatus, users_setStatus |
| Methods inherited from class com.google.code.facebookapi.BaseAdapter |
beginBatch, beginPermissionsMode, data_createObjectType, data_defineAssociation, data_defineObjectProperty, data_deleteObject, data_deleteObjects, data_dropObjectType, data_removeAssociatedObjects, data_removeAssociation, data_renameAssociation, data_renameObjectProperty, data_renameObjectType, data_setAssociation, data_setObjectProperty, data_setUserPreference, data_setUserPreferences, data_undefineAssociation, data_undefineObjectProperty, data_updateObject, endPermissionsMode, fbml_deleteCustomTags, fbml_registerCustomTags, getApiKey, getClient, getConnectTimeout, getRawResponse, getReadTimeout, getResponseFormat, getSecret, getServerUrl, profile_setInfo, profile_setInfoOptions, setCacheAppUser, setCacheSession, setCommunicationStrategy, setConnectTimeout, setReadTimeout, setServerUrl, setServerUrl, sms_sendMessage |
| 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_getDailyMetrics, admin_getDailyMetrics, admin_getMetrics, admin_getMetrics, application_getPublicInfo, application_getPublicInfoByApiKey, application_getPublicInfoByCanvasName, application_getPublicInfoById, batch_run, beginBatch, beginPermissionsMode, connect_registerUsers, connect_unregisterUsers, dashboard_multiAddNews, dashboard_multiAddNews, dashboard_multiClearNews, dashboard_multiClearNews, data_createObjectType, data_defineAssociation, data_defineObjectProperty, data_deleteObject, data_deleteObjects, data_dropObjectType, data_getAssociationDefinition, data_getAssociationDefinitions, data_getCookies, data_getCookies, data_getCookies, data_getCookies, data_getObject, data_getObjectProperty, data_getObjects, data_getObjectType, data_getObjectTypes, data_getUserPreferences, data_removeAssociatedObjects, data_removeAssociation, data_renameAssociation, data_renameObjectProperty, data_renameObjectType, data_setAssociation, data_setObjectProperty, data_setUserPreference, data_setUserPreferences, data_undefineAssociation, data_undefineObjectProperty, data_updateObject, endPermissionsMode, events_get, events_get, events_getMembers, fbml_deleteCustomTags, fbml_getCustomTags, fbml_registerCustomTags, feed_getRegisteredTemplateBundleByID, feed_getRegisteredTemplateBundles, fql_query, friends_areFriends, friends_areFriends, friends_get, friends_get, friends_getAppUsers, friends_getList, friends_getLists, friends_getMutualFriends, friends_getMutualFriends, getApiKey, getConnectTimeout, getRawResponse, getReadTimeout, getResponseFormat, getSecret, getServerUrl, groups_get, groups_getMembers, notifications_get, pages_getInfo, pages_getInfo, pages_getInfo, pages_getInfo, payments_getOrders, permissions_checkAvailableApiAccess, permissions_checkGrantedApiAccess, photos_addTags, photos_addTags, photos_createAlbum, photos_createAlbum, photos_createAlbum, photos_createAlbum, photos_get, photos_get, photos_get, photos_get, photos_get, photos_getAlbums, photos_getAlbums, photos_getAlbums, photos_getByAlbum, photos_getByAlbum, photos_getTags, photos_upload, photos_upload, photos_upload, photos_upload, photos_upload, photos_uploadToAlbum, photos_uploadToAlbum, photos_uploadWithCaption, photos_uploadWithCaption, profile_getFBML, profile_getFBML, profile_getFBML, profile_getFBML, profile_getInfo, profile_getInfoOptions, profile_setInfo, profile_setInfoOptions, setCacheAppUser, setCacheSession, setConnectTimeout, setReadTimeout, setServerUrl, setServerUrl, sms_sendMessage, stream_get, stream_getComments, stream_getFilters, users_getInfo, users_getInfo, users_getStandardInfo, users_getStandardInfo |
log
protected static org.apache.commons.logging.Log log
FacebookJsonRestClientBase
public FacebookJsonRestClientBase(ExtensibleClient client)
FacebookJsonRestClientBase
public FacebookJsonRestClientBase(java.lang.String apiKey,
java.lang.String secret)
- Constructor.
- Parameters:
apiKey - your Facebook API keysecret - your 'secret' Facebook key
FacebookJsonRestClientBase
public FacebookJsonRestClientBase(java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey)
- Constructor.
- Parameters:
apiKey - your Facebook API keysecret - your 'secret' Facebook keysessionKey - the session-id to use
FacebookJsonRestClientBase
public FacebookJsonRestClientBase(java.lang.String apiKey,
java.lang.String secret,
java.lang.String sessionKey,
boolean sessionSecret)
parseCallResult
protected <T> T parseCallResult(java.lang.Class<T> type,
java.lang.Object rawResponse)
throws FacebookException
- Throws:
FacebookException
executeBatch
public java.util.List<? extends java.lang.Object> executeBatch(boolean serial)
throws FacebookException
- Executes a batch of queries. You define the queries to execute by calling 'beginBatch' and then invoking the desired API methods that you want to execute as part
of your batch as normal. Invoking this method will then execute the API calls you made in the interim as a single batch query.
- Parameters:
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.
- Returns:
- a list containing the results of the batch execution. The list will be ordered such that the first element corresponds to the result of the first query in
the batch, and the second element corresponds to the result of the second query, and so on. The types of the objects in the list will match the type
normally returned by the API call being invoked (so calling users_getLoggedInUser as part of a batch will place a Long in the list, and calling friends_get
will place a Document in the list, etc.).
The list may be empty, it will never be null.
- Throws:
FacebookException
java.io.IOException
Copyright © 2010. All Rights Reserved.