Package com.restfb.types
Class Post.Targeting
- java.lang.Object
-
- com.restfb.types.AbstractFacebookType
-
- com.restfb.types.Post.Targeting
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Post.FeedTargeting
- Enclosing class:
- Post
public static class Post.Targeting extends AbstractFacebookType
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Targeting()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addCity(Post.KeyedType city)
boolean
addCountry(String country)
boolean
addLocale(Integer locale)
boolean
addRegion(Post.KeyedType region)
List<Post.KeyedType>
getCities()
Values of targeting cities.List<String>
getCountries()
Values of targeting countries.Post.FeedTargeting
getGeoLocations()
List<Integer>
getLocales()
Targeted locales.List<Post.KeyedType>
getRegions()
Values of targeting regions.boolean
removeCity(NamedFacebookType city)
boolean
removeCountry(String country)
boolean
removeLocale(Integer locale)
boolean
removeRegion(NamedFacebookType region)
void
setGeoLocations(Post.FeedTargeting geoLocations)
-
Methods inherited from class com.restfb.types.AbstractFacebookType
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
Targeting
public Targeting()
-
-
Method Detail
-
addCity
public boolean addCity(Post.KeyedType city)
-
addCountry
public boolean addCountry(String country)
-
addRegion
public boolean addRegion(Post.KeyedType region)
-
getCities
public List<Post.KeyedType> getCities()
Values of targeting cities. Use type of adcity to find Targeting Options and use the returned key to specify.- Returns:
- list of cities
-
getCountries
public List<String> getCountries()
Values of targeting countries. You can specify up to 25 countries. Use ISO 3166 format codes.- Returns:
- list of targeting countries.
-
getLocales
public List<Integer> getLocales()
Targeted locales. Use type of adlocale to find Targeting Options and use the returned key to specify.- Returns:
- list of locales
-
getRegions
public List<Post.KeyedType> getRegions()
Values of targeting regions. Use type ofadregion
to find Targeting Options and use the returned key to specify.- Returns:
- list of regions
-
removeCity
public boolean removeCity(NamedFacebookType city)
-
removeCountry
public boolean removeCountry(String country)
-
removeLocale
public boolean removeLocale(Integer locale)
-
removeRegion
public boolean removeRegion(NamedFacebookType region)
-
getGeoLocations
@GraphAPI(since="2.8") public Post.FeedTargeting getGeoLocations()
-
setGeoLocations
public void setGeoLocations(Post.FeedTargeting geoLocations)
-
-