Package com.restfb.types
Class Post.FeedTargeting
java.lang.Object
com.restfb.types.AbstractFacebookType
com.restfb.types.Post.Targeting
com.restfb.types.Post.FeedTargeting
- All Implemented Interfaces:
Serializable
- Enclosing class:
- Post
Object that controls news feed targeting for this post.
Anyone in these groups will be more likely to see this post, others will be less likely, but may still see it
anyway. Any of the targeting fields shown here can be used, none are required (applies to Pages only).
Represents the Feed Targeting API type.
- See Also:
-
Field Summary
Fields inherited from class com.restfb.types.Post.Targeting
cities, countries, locales, regions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addCollegeMajor
(String collegeMajor) boolean
addCollegeNetwork
(FacebookType collegeNetwork) boolean
addCollegeYear
(Integer collegeYear) boolean
addEducationStatus
(Integer educationStatus) boolean
boolean
boolean
addInterestedIn
(Integer interest) boolean
addInterests
(String interest) boolean
addRelationshipStatus
(Integer relationshipStatus) boolean
addWorkNetwork
(NamedFacebookType workNetwork) Maximum age.Must be 13 or higher.Target people who majored in these college subjects.Colleges, for college graduates.Array of integers for graduation year from college.Array of integers for targeting based on education level.getFanOf()
List of object ids.Target specific genders. 1 targets all male viewers and 2 females.Indicates targeting based on the 'interested in' field of the user profile.Indicates targeting based on the 'interests' field of the user profile.Array of integers for targeting based on relationship status.Company, organization, or other workplace.boolean
removeCollegeMajor
(String collegeMajor) boolean
removeCollegeNetwork
(FacebookType collegeNetwork) boolean
removeCollegeYear
(Integer collegeYear) boolean
removeEducationStatus
(Integer educationStatus) boolean
removeFanOf
(String interestId) boolean
removeGender
(Integer gender) boolean
removeInterestedIn
(Integer interest) boolean
removeInterests
(String interest) boolean
removeRelationshipStatus
(Integer relationshipStatus) boolean
removeWorkNetwork
(NamedFacebookType workNetwork) void
Maximum age.void
Must be 13 or higher.void
setRelevantUntilTs
(Date relevantUntilTs) Methods inherited from class com.restfb.types.Post.Targeting
addCity, addCountry, addLocale, addRegion, getCities, getCountries, getGeoLocations, getLocales, getRegions, removeCity, removeCountry, removeLocale, removeRegion, setGeoLocations
Methods inherited from class com.restfb.types.AbstractFacebookType
equals, hashCode, toString
-
Constructor Details
-
FeedTargeting
public FeedTargeting()
-
-
Method Details
-
getCollegeMajors
Target people who majored in these college subjects. Limited to 200 college major values. Use type of adcollegemajor to find Targeting Options and use the returned name to specify.- Returns:
- list of college majors
-
addCollegeMajor
-
removeCollegeMajor
-
getCollegeNetworks
Colleges, for college graduates. Limit is 200 values.- Returns:
- list of colleges
-
addCollegeNetwork
-
removeCollegeNetwork
-
getCollegeYears
Array of integers for graduation year from college.- Returns:
- graduation year list
-
addCollegeYear
-
removeCollegeYear
-
getEducationStatuses
Array of integers for targeting based on education level. Use 1 for high school, 2 for undergraduate, and 3 for alum (or localized equivalents).- Returns:
- list of education levels
-
addEducationStatus
-
removeEducationStatus
-
getFanOf
List of object ids. the user should be fan of these objects (interests).- Returns:
- list of object ids
-
addFanOf
-
removeFanOf
-
getGenders
Target specific genders. 1 targets all male viewers and 2 females. Default is to target both.- Returns:
- list of genders
-
addGender
-
removeGender
-
getInterestedIn
Indicates targeting based on the 'interested in' field of the user profile. You can specify an integer of 1 to indicate male, 2 indicates female. Default is all types. Please note 'interested in' targeting is not available in France due to local laws.- Returns:
- list of 'interested in' types
-
addInterestedIn
-
removeInterestedIn
-
getInterests
Indicates targeting based on the 'interests' field of the user profile.- Returns:
- list of 'interests' types
-
addInterests
-
removeInterests
-
getRelationshipStatuses
Array of integers for targeting based on relationship status. Use 1 for single, 2 for 'in a relationship', 3 for married, and 4 for engaged. Default is all types.- Returns:
- list of relationship statuses
-
addRelationshipStatus
-
removeRelationshipStatus
-
getWorkNetworks
Company, organization, or other workplace. Name: Name of targeted workplace. Use type of adworkplace to find Targeting Options and use the returned name to specify this. Id: Unique ID of targeted workplace. Use type of adworkplace to find Targeting Options and use the returned key to specify this (must match paired name value).- Returns:
- list of work networks
-
addWorkNetwork
-
removeWorkNetwork
-
getAgeMax
Maximum age. -
setAgeMax
Maximum age. -
getAgeMin
Must be 13 or higher. Default is 0 -
setAgeMin
Must be 13 or higher. Default is 0 -
getRelevantUntilTs
-
setRelevantUntilTs
-