|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FacebookOperations
Interface specifying a basic set of operations for interacting with Facebook.
Implemented by FacebookTemplate
. Not often used directly, but a
useful option to enhance testability, as it can easily be mocked or stubbed.
Many of the methods contained in this interface require an access token from Facebook. When a method's description speaks of the "current user", it is referring to the user for whom the access token has been issued.
Method Summary | |
---|---|
java.util.List<java.lang.String> |
getFriendIds()
Get a list of the user's friends. |
java.lang.String |
getProfileId()
Retrieves the user's Facebook profile ID. |
byte[] |
getProfilePicture()
Retrieves the current user's profile picture as an array of bytes. |
byte[] |
getProfilePicture(java.lang.String profileId)
Retrieves a user's profile picture as an array of bytes. |
java.lang.String |
getProfileUrl()
Retrieve the URL to the user's Facebook profile. |
FacebookProfile |
getUserProfile()
Retrieve the current user's Facebook profile information. |
void |
publish(java.lang.String object,
java.lang.String connection,
MultiValueMap<java.lang.String,java.lang.String> data)
Low-level publish-to-Facebook method for publishing any type of object supported by Facebook's API. |
void |
updateStatus(java.lang.String status)
Posts a message to the current user's wall. |
void |
updateStatus(java.lang.String message,
FacebookLink link)
Posts a message to the current user's wall along with a link. |
Method Detail |
---|
java.lang.String getProfileId()
FacebookProfile getUserProfile()
java.lang.String getProfileUrl()
java.util.List<java.lang.String> getFriendIds()
String
s where each entry is the Facebook
ID of one of the user's friends.void updateStatus(java.lang.String status)
message
- The message to postvoid updateStatus(java.lang.String message, FacebookLink link)
message
- The message to postlink
- A link to be included in the status updatevoid publish(java.lang.String object, java.lang.String connection, MultiValueMap<java.lang.String,java.lang.String> data)
Low-level publish-to-Facebook method for publishing any type of object supported by Facebook's API.
object
- The ID of the object to publish to.connection
- The connection to be published.data
- The data to be published.byte[] getProfilePicture()
byte[] getProfilePicture(java.lang.String profileId)
profileId
- the Facebook ID of the user.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |