facebook4j.api
Interface QuestionMethods

All Known Subinterfaces:
Facebook

public interface QuestionMethods

Author:
Ryuji Yamashita - roundrop at gmail.com

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

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

String createQuestion(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(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(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(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(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(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

String addQuestionOption(String questionId,
                         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(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


Copyright © 2019. All rights reserved.