A question asked by a user, as represented in the Graph API.
The User object has a questions connection that returns questions posed by the current user.
To read a Question, you need the following permissions along with a valid access token:
user_questions for questions asked by the current user.friends_questions for questions asked by friends of the current user.To publish a 'question' you need:
access tokenpublish_stream permissionWith that granted, you can post a question on behalf of a user or a Page by issuing an HTTP POST request with the question content to:
https://graph.facebook.com/PROFILE_ID/questions
Questions that the current user has asked:
https://graph.facebook.com/me/questions
Posting a question:
curl -F 'access_token=...' \
-F 'question=What is your favorite color?' \
https://graph.facebook.com/me/questions
| Name | Description | Permissions | Returns |
id | Question ID |
|
|
from | User who asked the question |
| Object containing |
question | Text of the question |
|
|
created_time | Time when question was created |
|
|
updated_time | Time when question was last updated |
|
|
options | The list of options available as answers to the question |
| Object containing |
| Name | Description | Permissions | Returns |
| options | The options available as answers to the question |
| array of QuestionOption objects |
You can write to the QUESTIONS_ID/options connection to post a option to the question by issuing an HTTP POST request with the publish_stream permission and following parameters.
| Parameter | Description | Type | Required |
|---|---|---|---|
option |
Description of option | string |
no |
If the write is successful, you get the following return.
| Name | Description | Type |
|---|---|---|
id |
option ID | string |