|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.f8api.Url
public class Url
Field Summary | |
---|---|
protected static java.lang.String |
ADD_FRIEND
|
protected static java.lang.String |
GENERATE_AUTH_TOKEN
Facebook page allowing user to generate an auth token that is entered into the app. |
protected static java.lang.String |
LOGIN
Longin url ?api_key=${api_key}&v=${v} |
protected static java.lang.String |
MESSAGE
|
protected static java.lang.String |
NOTES
|
protected static java.lang.String |
PHOTO_SEARCH
|
protected static java.lang.String |
PHOTOS
|
protected static java.lang.String |
POKE
|
protected static java.lang.String |
PROFILE
|
protected static java.lang.String |
WALL
|
Constructor Summary | |
---|---|
Url()
|
Method Summary | |
---|---|
static java.lang.String |
getAddFriendUrl(java.lang.String userId)
add the specified user as a friend |
static java.lang.String |
getDesktopLoginUrl(java.lang.String apiKey,
java.lang.String authToken,
boolean popup,
boolean skipCookie,
boolean hideCheckbox)
Get a login url for a desktop application. |
static java.lang.String |
getLoginAuthTokenGenerationUrl(java.lang.String apiKey)
Use the Facebook Token Generator to let the user create a token that is then set in our app manually by the user. |
protected static java.lang.String |
getLoginUrl(java.lang.String apiVersion,
java.lang.String apiKey,
java.lang.String next,
java.lang.String authToken,
boolean popup,
boolean skipCookie,
boolean hideCheckbox,
boolean toCanvas)
Get a general login url. |
static java.lang.String |
getMessageUrl(long userId,
java.lang.String subject,
java.lang.String message)
send a message to the specified user. |
static java.lang.String |
getNotesUrl(long userId)
read the specified user's notes |
static java.lang.String |
getPhotosOfUrl(long userId)
see photos of the specified user |
static java.lang.String |
getPhotosUrl(long userId)
See photos taken by the specified user. |
static java.lang.String |
getPokeUrl(long userId)
poke the specified user |
static java.lang.String |
getProfileUrl(long userId)
view the specified user's profile |
static java.lang.String |
getWallUrl(long userId)
read or post on the specified user's wall |
static java.lang.String |
getWebappLoginRedirectUrl(Application app,
boolean toCanvas,
java.lang.String next,
java.lang.String authToken)
Upon successful authentication, if the user has never logged in to this application before, he will be asked to accept the terms of service for using the application. |
static java.lang.String |
getWebappLoginUrl(java.lang.String apiKey,
java.lang.String next,
boolean popup,
boolean skipCookie,
boolean hideCheckbox,
boolean toCanvas)
Get a login url for a webapp. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String LOGIN
protected static final java.lang.String PROFILE
protected static final java.lang.String POKE
protected static final java.lang.String MESSAGE
protected static final java.lang.String ADD_FRIEND
protected static final java.lang.String PHOTOS
protected static final java.lang.String PHOTO_SEARCH
protected static final java.lang.String WALL
protected static final java.lang.String NOTES
protected static final java.lang.String GENERATE_AUTH_TOKEN
Constructor Detail |
---|
public Url()
Method Detail |
---|
public static java.lang.String getWebappLoginUrl(java.lang.String apiKey, java.lang.String next, boolean popup, boolean skipCookie, boolean hideCheckbox, boolean toCanvas)
http://apps.facebook.com/appName/next?auth_token=e7e418a4cab359827ad98761b742af7b
If the app's callBack page is configured for FBML, a request will be made
by the Facebook server to:
http://www.mycompany.com/some/path/callback.htmlnext?auth_token=e7e418a4cab359827ad98761b742af7b
Example: If the callback url is:
http://www.mycompany.com/callback/
And the next
parameter is:
success.html
Then on a successful login the user will see the content of:
http://www.mycompany.com/callback/success.html
And when toCanvas == false
they will be redirected to:
http://www.mycompany.com/callback/success.html?auth_token=347d2d517bcc31650b7e3d3ee830bbcd
Or when toCanvas == true
they will be redirected to:
http://apps.facebook.com/appName/success.html?auth_token=e7e418a4cab359827ad98761b742af7b
Which will render FBML or iFrame content, based on how the app was
configured at Facebook.
apiKey
- next
- is usually the callback-filename the user should redirect to
after they loginpopup
- skipCookie
- hideCheckbox
- toCanvas
-
public static java.lang.String getDesktopLoginUrl(java.lang.String apiKey, java.lang.String authToken, boolean popup, boolean skipCookie, boolean hideCheckbox)
apiKey
- authToken
- popup
- skipCookie
- if true, the user will have to login again even for infinite
sessionshideCheckbox
-
protected static java.lang.String getLoginUrl(java.lang.String apiVersion, java.lang.String apiKey, java.lang.String next, java.lang.String authToken, boolean popup, boolean skipCookie, boolean hideCheckbox, boolean toCanvas)
apiVersion
- The version of the API you are using. Should be set to "1.0".
Required.apiKey
- Uniquely assigned to the vendor, and identifies, among other
things, the list of acceptable source IPs for this call.
Required.next
- A way for web based applications to preserve some state for
this login - this will get appended to their callback_url
after the user logs in as described below. Optional.authToken
- Before generating the login URL, the desktop application
should call the facebook.auth.createToken API function, and
then use the auth_token returned by that function here.
Required for desktop apps.popup
- set true to use an alternative style for the login page that
does not contain any Facebook navigational elements. For the
best results, the pop-up should ideally have the following
dimensions: width=646 pixels, height=436 pixels. Optional
(default is false).skipCookie
- Pass this in to allow a user to re-enter their login
information. This may be useful if another Facebook user
previously forgot to logout. Optional(default is false).hideCheckbox
- Pass this in to hide the "Save my login info" checkbox from
the user. This may be useful if your application does not wish
to persist the user's session information. See the "Infinite
Sessions" section below for more info. Optional (default is
false).toCanvas
- If you pass this parameter, we will use your canvas page URL
instead of your callback URL as the base for the URL we
redirect the user to. Optional (default is false).
public static java.lang.String getWebappLoginRedirectUrl(Application app, boolean toCanvas, java.lang.String next, java.lang.String authToken)
callback_url + next + separator + 'auth_token=______'
with these values.
app
- toCanvas
- Use the same value as for getLoginUrl. If true, redirect will
point to the canvas page you set up (which will then
indirectly result in a request going to your callback_url).next
- Use the same value as for getLoginUrl.authToken
-
public static java.lang.String getLoginAuthTokenGenerationUrl(java.lang.String apiKey)
apiKey
-
public static java.lang.String getProfileUrl(long userId)
userId
-
public static java.lang.String getPokeUrl(long userId)
userId
-
public static java.lang.String getMessageUrl(long userId, java.lang.String subject, java.lang.String message)
userId
- the user ID to send the message tosubject
- the pre-loaded message subject, or null for nonebody
- the pre-loaded message body, or null for none
public static java.lang.String getAddFriendUrl(java.lang.String userId)
userId
-
public static java.lang.String getPhotosUrl(long userId)
userId
-
public static java.lang.String getPhotosOfUrl(long userId)
userId
-
public static java.lang.String getWallUrl(long userId)
userId
-
public static java.lang.String getNotesUrl(long userId)
userId
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |