เวอร์ชันของ API กราฟ

Games IAPProduct

การอ่าน

An in-app-purchaseable product

ตัวอย่าง

Graph API Explorer
GET /v19.0/{games-iap-product-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(
    '/{games-iap-product-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(
    "/{games-iap-product-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{games-iap-product-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:@"/{games-iap-product-id}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
หากคุณต้องการเรียนรู้วิธีใช้ API กราฟ โปรดอ่านคู่มือการใช้ API กราฟของเรา

พารามิเตอร์

จุดสิ้นสุดนี้ไม่ต้องพารามิเตอร์ใดๆ

ช่อง

ช่องคำอธิบาย
id
numeric string

The id of the object

description
string

Description of the product (e.g. "Used as in-app currency")

image_uri
string

The associated image of the product for the Facebook Pay dialog

local_price_amount_cents
integer

Local price of the product in 1/100ths of the major unit of currency (e.g. 1 JPY -> 100, 1.23 USD -> 123)

local_price_formatted
string

Human-readable local price of the product (e.g. "$1.23")

price
string

Human-readable price of the product (e.g. "$1.23")

price_amount_cents
unsigned int32

Price of the product in 1/100ths of the major unit of currency (e.g. 1 JPY -> 100, 1.23 USD -> 123)

price_currency_code
string

Currency code of price (e.g. "JPY", "USD")

product_id
string

Identifier for the product (e.g. "gold_bar")

product_type
enum

Type of the product (e.g. managed)

subscription_term
enum

The subscription renewal length of time if ProductType is SUBSCRIPTION

title
string

Title of the product displayed to the user (e.g. "Gold Bar")

Error Codes

ข้อผิดพลาดคำอธิบาย
100Invalid parameter

การสร้าง

คุณไม่สามารถดำเนินการนี้ที่ปลายทางนี้

กำลังอัพเดต

คุณไม่สามารถดำเนินการนี้ที่ปลายทางนี้

กำลังลบ

คุณไม่สามารถดำเนินการนี้ที่ปลายทางนี้