com.jayway.facebooktestjavaapi.testuser
Interface FacebookTestUserAccount

All Known Implementing Classes:
HttpClientFacebookTestUserAccount

public interface FacebookTestUserAccount

API for a Facebook test user, encapsulating the ID, Access token and the Login URL for the user.

This API also provides access to JSON string representation of connections to user objects described in the Facebook Graph API documentation, which is essentially resources accessible using the https://graph.facebook.com/ID/CONNECTION_TYPE syntax.


Method Summary
 String accessToken()
           
 void copyToOtherApplication(String otherApplicationId, String otherApplicationAccessToken, boolean appInstalled, String permissions)
          Copies this test user to another application
 void delete()
          Deletes this test user in Facebook.
 String getBooks()
           
 String getCheckins()
           
 String getEvents()
           
 String getFriends()
           
 String getGroups()
           
 String getLikes()
           
 String getMovies()
           
 String getMusic()
           
 String getNewsFeed()
           
 String getNotes()
           
 String getPhotoAlbums()
           
 String getPhotoTags()
           
 String getProfileFeed()
           
 String getUserDetails()
           
 String getVideoTags()
           
 String getVideoUploads()
           
 String id()
           
 String json()
           
 String loginUrl()
          The login URL gives access to the Facebook page for this test user.
 void makeFriends(FacebookTestUserAccount friend)
          Creates a friend relationship between this test user and the one in the parameter.
 

Method Detail

delete

void delete()
Deletes this test user in Facebook.


copyToOtherApplication

void copyToOtherApplication(String otherApplicationId,
                            String otherApplicationAccessToken,
                            boolean appInstalled,
                            String permissions)
Copies this test user to another application

Parameters:
otherApplicationId - The application ID of the other application
otherApplicationAccessToken - The access token for the other application
appInstalled - Set to true to have the user automatically accept permissions requested from other application
permissions - The permissions the other application is requesting.

makeFriends

void makeFriends(FacebookTestUserAccount friend)
Creates a friend relationship between this test user and the one in the parameter.

Parameters:
friend - A Facebook test user account.

getFriends

String getFriends()
Returns:
A JSON string array of /me/friends

getProfileFeed

String getProfileFeed()
Returns:
The JSON string array of /ID/feed

getNewsFeed

String getNewsFeed()
Returns:
The JSON string array of /ID/home

getLikes

String getLikes()
Returns:
The JSON string array of /ID/likes

getMovies

String getMovies()
Returns:
The JSON string array of /ID/movies

getMusic

String getMusic()
Returns:
The JSON string array of /ID/music

getBooks

String getBooks()
Returns:
The JSON string array of /ID/books

getNotes

String getNotes()
Returns:
The JSON string array of /ID/notes

getPhotoTags

String getPhotoTags()
Returns:
The JSON string array of /ID/photos

getPhotoAlbums

String getPhotoAlbums()
Returns:
The JSON string array of /ID/albums

getVideoTags

String getVideoTags()
Returns:
The JSON string array of /ID/videos

getVideoUploads

String getVideoUploads()
Returns:
The JSON string array of /ID/videos/uploaded

getEvents

String getEvents()
Returns:
The JSON string array of /ID/events

getGroups

String getGroups()
Returns:
The JSON string array of /ID/groups

getCheckins

String getCheckins()
Returns:
The JSON string array of /ID/checkins

getUserDetails

String getUserDetails()
Returns:
A JSON string containing user details for this test user (/me)

id

String id()
Returns:
The Facebook ID for this test user

accessToken

String accessToken()
Returns:
The access token for this test user.

loginUrl

String loginUrl()
The login URL gives access to the Facebook page for this test user.

The Facebook documentation states that the URL expires after first use or after 10 minutes, whichever comes first.

Returns:
The login URL for this test user.

json

String json()
Returns:
The JSON string representation of the id, access token and login URL.


Copyright © 2011. All Rights Reserved.