public static class Privacy.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Privacy.Builder() |
| Modifier and Type | Method and Description |
|---|---|
Privacy.Builder |
addAllowed(java.util.Collection<? extends java.lang.String> userOrListIds)
Add users and/or friend lists to the allowed list.
|
Privacy.Builder |
addAllowed(Privacy.PrivacySettings privacySettings)
Add a predefined friend list to the allowed list This can only
be
ALL_FRIENDS or
FRIENDS_OF_FRIENDS to
include all members of those sets. |
Privacy.Builder |
addAllowed(java.lang.String userOrListId)
Add a user or a friend list to the allowed list.
Only applicable in case of selected CUSTOM in setPrivacySettings(com.sromku.simple.fb.entities.Privacy.PrivacySettings) method. Note: If you defined other privacy setting than CUSTOM and still decided to use this
method, then the privacy will be changed with warning to
CUSTOM. |
Privacy.Builder |
addDenied(java.util.Collection<? extends java.lang.String> userOrListIds)
Add users and/or friend lists to the denied list.
|
Privacy.Builder |
addDenied(java.lang.String userOrListId)
Add a user or a friend list to the denied list.
|
Privacy |
build() |
Privacy.Builder |
setPrivacySettings(Privacy.PrivacySettings privacySettings)
The privacy parameter only applies for posts to the user's own
timeline and is ultimately governed by the privacy ceiling a user has
configured for an app.
Important: If you choose CUSTOM
, you must call either addAllowed() or
addDenied(). |
public Privacy.Builder setPrivacySettings(Privacy.PrivacySettings privacySettings)
CUSTOM
, you must call either addAllowed() or
addDenied().privacySettings - The wanted privacy settingspublic Privacy.Builder addAllowed(java.lang.String userOrListId)
CUSTOM in setPrivacySettings(com.sromku.simple.fb.entities.Privacy.PrivacySettings) method. CUSTOM and still decided to use this
method, then the privacy will be changed with warning to
CUSTOM.userOrListId - user Id or friend list Id that can see the post.public Privacy.Builder addAllowed(Privacy.PrivacySettings privacySettings)
ALL_FRIENDS or
FRIENDS_OF_FRIENDS to
include all members of those sets. CUSTOM in setPrivacySettings(com.sromku.simple.fb.entities.Privacy.PrivacySettings) method. CUSTOM and still decided to use this
method, then the privacy will be changed with warning to
CUSTOM.privacySettings - ALL_FRIENDS or
FRIENDS_OF_FRIENDS to include all members of those sets.java.lang.UnsupportedOperationException - in case of using other values than
ALL_FRIENDS or
FRIENDS_OF_FRIENDSpublic Privacy.Builder addAllowed(java.util.Collection<? extends java.lang.String> userOrListIds)
CUSTOM in setPrivacySettings(com.sromku.simple.fb.entities.Privacy.PrivacySettings) method. CUSTOM and still decided to use this
method, then the privacy will be changed with warning to
CUSTOM.userOrListIds - mixed user Ids and friend list Ids that can see the
post.public Privacy.Builder addDenied(java.lang.String userOrListId)
CUSTOM in setPrivacySettings(com.sromku.simple.fb.entities.Privacy.PrivacySettings) method. CUSTOM and still decided to use this
method, then the privacy will be changed with warning to
CUSTOM.userOrListId - user Id or friend list Id that cannot see the postpublic Privacy.Builder addDenied(java.util.Collection<? extends java.lang.String> userOrListIds)
CUSTOM in setPrivacySettings(com.sromku.simple.fb.entities.Privacy.PrivacySettings) method. CUSTOM and still decided to use this
method, then the privacy will be changed with warning to
CUSTOM.userOrListIds - mixed user Ids and friend list Ids that can see the
post.public Privacy build()