...
Creating an album
Through this method, a user is allowed to create an albumThe createAlbum
operation creates a new album based on the specified details.
Code Block |
---|
language | html/xml |
---|
title | createAlbum |
---|
|
<facebook.createAlbum>
<userId>{$ctx:userId}</userId>
<message>{$ctx:message}</message>
<name>{$ctx:name}</name>
<privacy>{$ctx:privacy}</privacy>
<location>{$ctx:location}</location>
<isDefault>{$ctx:isDefault}</isDefault>
<place>{$ctx:place}</place>
</facebook.createAlbum> |
Properties
userId
: The Object ID that you are creating an album for(Default me) The profile for which you are creating the album.name
: Required - The name given to the album. The title of the album.message
: The description of the album, which will show up in news feed stories as the status message. privacy
: Privacy album. This is what appears in news feed stories below the title of the album.privacy
: The privacy setting for the album, which is an Object. Values could be . Possible values are EVERYONE, ALL_FRIENDS, FRIENDS_OF_FRIENDS, CUSTOM and SELF. For further more information on the privacy parameter, refer to see https://developers.facebook.com/docs/reference/api/privacy-parameter.location
: A text The textual location of the album for non-page locations.isDefault
: True indicates that the request will create the Set to true
if you want to create an application specific album.place
: The ID of a location page to tag the album with.
Sample request
Following is a sample REST request for the createAlbum methodthat can be handled by the createAlbum
operation.
Code Block |
---|
title | Sample Request for createAlbum |
---|
|
{
"apiUrl":"https://graph.facebook.com",
"apiVersion":"v2.4",
"accessToken":"CAACEdEose0cBAE0MQc25uyfYTS8zsZCu3wbJEZAcGc1Mzle1LbzJHI8LVAhvpWsSkQq4SrZAzZBruv3yWSoJZCSFFlWeal2sFOFplmjPfs39mxJLSF8YxPePkeuCU7cjYqEKCtW3qTEy6XUWHD1T1ush5Rhj85ZBEa94E7pP7XuuITLsFweZBoMMRX0QyGGWw0ZD",
"message":"this is a test message",
"name":"WSO2 connector",
"privacy":"{value:'EVERYONE'}"
} |
...
Anchor |
---|
| getAlbumDetails |
---|
| getAlbumDetails |
---|
|
Retrieving album details
This method The getAlbumDetails
operation retrieves details of the a specific user album.
Code Block |
---|
language | xml |
---|
title | getAlbumDetails |
---|
|
<facebook.getAlbumDetails>
<albumId>{$ctx:albumId}</albumId>
<fields>{$ctx:fields}</fields>
<connection>{$ctx:connection}</connection>
</facebook.getAlbumDetails> |
Properties
albumId
: This is the The ID of the album.fields
: The fields which belongs to an object.
Sample request...
Anchor |
---|
| postPhotoToAlbum |
---|
| postPhotoToAlbum |
---|
|
Adding photos to an albumThis method allows users to post photos to the album. This does not require init to be called before the operation. Refer to multipart processing for detailed information.
...
Sample configuration
Following is a sample proxy service that illustrates how to connect to Facebook with the init operation and use the getAlbumDetails operation to create an album. The sample request for this proxy can be found in getAlbumDetails sample request . You can use this sample as a template for using other operations in this category.
Info |
---|
As a best practice, create a separate sequence for handling the response payload for errors. In the following sample, this sequence is "faultHandlerSeq". |
...