facebook4j.api
Interface QuestionMethods

All Known Subinterfaces:
Facebook
All Known Implementing Classes:
FacebookImpl

public interface QuestionMethods

Author:
Ryuji Yamashita - roundrop at gmail.com

Method Summary
 java.lang.String addQuestionOption(java.lang.String questionId, java.lang.String optionDescription)
          Adds the option to a question.
 java.lang.String createQuestion(QuestionUpdate questionUpdate)
          Creates a current page's question.
 java.lang.String createQuestion(java.lang.String id, QuestionUpdate questionUpdate)
          Creates the question.
 boolean deleteQuestion(java.lang.String questionId)
          Deletes the question.
 Question getQuestion(java.lang.String questionId)
          Returns a single question.
 Question getQuestion(java.lang.String questionId, Reading reading)
          Returns a single question.
 ResponseList<Question.Option> getQuestionOptions(java.lang.String questionId)
          Returns the options available as answers to the question.
 ResponseList<Question.Option> getQuestionOptions(java.lang.String questionId, Reading reading)
          Returns the options available as answers to the question.
 ResponseList<QuestionVotes> getQuestionOptionVotes(java.lang.String questionId)
          Returns the votes a particular option to a question has received.
 ResponseList<Question> getQuestions()
          Returns the current user's/page's questions.
 ResponseList<Question> getQuestions(Reading reading)
          Returns the current user's/page's questions.
 ResponseList<Question> getQuestions(java.lang.String id)
          Returns a user's/page's questions.
 ResponseList<Question> getQuestions(java.lang.String id, Reading reading)
          Returns a user's/page's questions.
 

Method Detail

getQuestions

ResponseList<Question> getQuestions()
                                    throws FacebookException
Returns the current user's/page's questions.

Returns:
questions
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#questions - Facebook Developers

getQuestions

ResponseList<Question> getQuestions(Reading reading)
                                    throws FacebookException
Returns the current user's/page's questions.

Parameters:
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
questions
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#questions - Facebook Developers

getQuestions

ResponseList<Question> getQuestions(java.lang.String id)
                                    throws FacebookException
Returns a user's/page's questions.

Parameters:
id - the ID of a user/page
Returns:
questions
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#questions - Facebook Developers

getQuestions

ResponseList<Question> getQuestions(java.lang.String id,
                                    Reading reading)
                                    throws FacebookException
Returns a user's/page's questions.

Parameters:
id - the ID of a user/page
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
questions
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#questions - Facebook Developers

createQuestion

java.lang.String createQuestion(QuestionUpdate questionUpdate)
                                throws FacebookException
Creates a current page's question.

Parameters:
questionUpdate - the question to be created
Returns:
The new question ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#questions - Facebook Developers

createQuestion

java.lang.String createQuestion(java.lang.String id,
                                QuestionUpdate questionUpdate)
                                throws FacebookException
Creates the question.

Parameters:
id - the ID of a page
questionUpdate - the question to be created
Returns:
The new question ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#questions - Facebook Developers

getQuestion

Question getQuestion(java.lang.String questionId)
                     throws FacebookException
Returns a single question.

Parameters:
questionId - the ID of the question
Returns:
question
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Question - Facebook Developers

getQuestion

Question getQuestion(java.lang.String questionId,
                     Reading reading)
                     throws FacebookException
Returns a single question.

Parameters:
questionId - the ID of the question
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
question
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Question - Facebook Developers

deleteQuestion

boolean deleteQuestion(java.lang.String questionId)
                       throws FacebookException
Deletes the question.

Parameters:
questionId - the ID of the question
Returns:
true if delete is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#questions - Facebook Developers

getQuestionOptions

ResponseList<Question.Option> getQuestionOptions(java.lang.String questionId)
                                                 throws FacebookException
Returns the options available as answers to the question.

Parameters:
questionId - the ID of the question
Returns:
the options available as answers to the question
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Question#options - Facebook Developers

getQuestionOptions

ResponseList<Question.Option> getQuestionOptions(java.lang.String questionId,
                                                 Reading reading)
                                                 throws FacebookException
Returns the options available as answers to the question.

Parameters:
questionId - the ID of the question
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
the options available as answers to the question
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Question#options - Facebook Developers

addQuestionOption

java.lang.String addQuestionOption(java.lang.String questionId,
                                   java.lang.String optionDescription)
                                   throws FacebookException
Adds the option to a question.

Parameters:
questionId - the ID of the question
optionDescription - description
Returns:
option ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Question#options - Facebook Developers

getQuestionOptionVotes

ResponseList<QuestionVotes> getQuestionOptionVotes(java.lang.String questionId)
                                                   throws FacebookException
Returns the votes a particular option to a question has received.

Parameters:
questionId - the ID of the question
Returns:
option of users who have voted for this specific option
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
QuestionOption - Facebook Developers