Represents a hotel in a catalog
GET /v10.0/{hotel-id} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->get(
'/{hotel-id}',
'{access-token}'
);
} catch(Facebook\Exceptions\FacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
"/{hotel-id}",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{hotel-id}",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{hotel-id}"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
Field | Description |
---|---|
id numeric string | Id |
address string | Address |
applinks | App links for native platforms, e.g. Android, iOS and Windows Phone |
brand string | Brand |
category string | The type of property, such as a hotel, can be any arbitrary string. |
currency string | Currency |
description string | Description |
guest_ratings string | GuestRatings |
hotel_id string | HotelId |
image_fetch_status enum {NO_STATUS, DIRECT_UPLOAD, FETCHED, FETCH_FAILED, PARTIAL_FETCH, OUTDATED} | Status of images having been fetched from image URLs |
images list<string> | Images |
lowest_base_price string | LowestBasePrice |
loyalty_program string | LoyaltyProgram |
margin_level unsigned int32 | MarginLevel |
name string | Name |
phone string | Phone |
sale_price string | Sale price |
sanitized_images list<string> | Images with sanitized urls |
star_rating float | StarRating |
url string | Url |
Edge | Description |
---|---|
Edge to mediator between the dynamic item and AR that holds metadata about the AR | |
HotelRooms | |
Edge to mediator between the dynamic item and video that holds metadata about the video |
Error | Description |
---|---|
100 | Invalid parameter |
hotels
edge from the following paths: Parameter | Description |
---|---|
address Object | The address of the hotel Required |
applinks Object | App links for native platforms, e.g. Android, IOS and Windows Phone. |
base_price int64 | The base price of the hotel |
brand string | Hotel brand |
currency ISO 4217 Currency Code | Default value: USD The currency for base_price, e.g. USD |
description string | Description of the hotel Required |
guest_ratings list<Object> | Guest ratings for this hotel. |
hotel_id string | A unique identifier for this hotel provided by advertiser. (i.e. from the |
images list<Object> | Links to hotel images. Please note that carousel format utilizes a square 1:1 aspect ratio images (recommended size - 600x600px) while single hotel ad uses 1.91:1 aspect ratio image(recommended size - 1200x630px). Please provide at least one image. Required |
name string | Name of the hotel Required |
phone phone number string | Hotel's phone number |
star_rating float | The star rating of the hotel |
url URL | Link to the external site where you can book a hotel room Required |
id
in the return type.id
: numeric string, Error | Description |
---|---|
100 | Invalid parameter |
/{hotel_id}
.Parameter | Description |
---|---|
address Object | The address of the hotel |
applinks Object | App links for native platforms, e.g. Android, IOS and Windows Phone. |
base_price int64 | The base price of the hotel |
brand string | Hotel brand |
currency ISO 4217 Currency Code | The currency for base_price, e.g. USD |
description string | Description of the hotel |
guest_ratings list<Object> | Guest ratings for this hotel. |
images list<Object> | Links to hotel images. Please note that carousel format utilizes a square 1:1 aspect ratio images (recommended size - 600x600px) while single hotel ad uses 1.91:1 aspect ratio image(recommended size - 1200x630px). Please provide at least one image. |
name string | Name of the hotel |
phone phone number string | Hotel's phone number |
star_rating float | The star rating of the hotel |
url URL | Link to the external site where you can book a hotel room |
success
: bool, Error | Description |
---|---|
100 | Invalid parameter |
/{hotel_id}
.success
: bool, Error | Description |
---|---|
100 | Invalid parameter |