org.springframework.social.facebook.api
Class PostData
java.lang.Object
org.springframework.social.facebook.api.PostData
public class PostData
- extends Object
An object that represents a new post to be created.
Offers a builder-like way of creating a new post.
Given to FeedOperations.post(PostData)
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PostData
public PostData(String targetFeedId)
- Creates a new
PostData
.
- Parameters:
targetFeedId
- The ID of the owner of the post.
getTargetFeedId
public String getTargetFeedId()
message
public PostData message(String message)
- Parameters:
message
- A message for the post.
link
public PostData link(String linkUrl)
- Parameters:
linkUrl
- A link to include in the post.
name
public PostData name(String name)
- Parameters:
name
- A name (e.g., title) for the post.
caption
public PostData caption(String caption)
- Parameters:
caption
- A caption for the post.
description
public PostData description(String description)
- Parameters:
description
- A description of the post.
place
public PostData place(String placeId)
- Parameters:
placeId
- The ID of a place to associate with the post.
tags
public PostData tags(String... tags)
- Parameters:
tags
- One or more Facebook user IDs to tag in the post. Will be ignored unless a place is specified.
picture
public PostData picture(String picture)
- Parameters:
picture
- The URL to a picture to embed in the post
privacy
public PostData privacy(Post.Privacy privacy)
- Parameters:
privacy
- The privacy setting for the post. If CUSTOM, then you must also set at least one of allow() or deny().
allow
public PostData allow(String... allow)
- Parameters:
allow
- One or more Facebook User IDs and friend list IDs that can see the post. Ignored unless privacy is CUSTOM.
deny
public PostData deny(String... deny)
- Parameters:
deny
- One or more Facebook User IDs and friend list IDs that cannot see the post. Ignored unless privacy is CUSTOM.
toRequestParameters
public MultiValueMap<String,Object> toRequestParameters()