Package com.restfb.types
Class GraphResponse
java.lang.Object
com.restfb.types.GraphResponse
Type that can be used as return value for publishing new objects to Facebook.
Id, post_id and success field are accessible. Have a look at the fields and methods javadoc
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheck()getId()returns the id that is used for the post or comment.booleantrueif publishing of the object was successful,falseotherwise.voidvoidvoidsetSuccess(boolean success) trueif publishing of the object was successful,falseotherwise.
-
Constructor Details
-
GraphResponse
public GraphResponse()
-
-
Method Details
-
getTimelineId
returns the id that is used for the post or comment.Normally the
idof the new object is returned, but after publishing a photo thepost idis returned. So you get the id of the corresponding post without put the logic in your application.Attention: if you publish a photo without story you get the photo id here
- Returns:
- id of the new created post / comment
-
check
-
isSuccess
trueif publishing of the object was successful,falseotherwise. if the success field is not provided by Facebook, we check if the id field is present -
setSuccess
trueif publishing of the object was successful,falseotherwise. if the success field is not provided by Facebook, we check if the id field is present -
getId
-
setId
-
getPostId
-
setPostId
-