PagePublishedPosts
| ชื่อ | คำอธิบาย |
|---|---|
| การเข้าถึงเนื้อหาสาธารณะของเพจ | This feature permission may be required. |
GET /v25.0/{page-id}/published_posts 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(
'/{page-id}/published_posts',
'{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(
"/{page-id}/published_posts",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{page-id}/published_posts",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{page-id}/published_posts"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];limit ได้สูงสุด 100 รายการเท่านั้น หากคุณพยายามอ่านเกินกว่าที่กำหนด คุณจะได้รับข้อความแสดงข้อผิดพลาดไม่ให้เกิน 100/{page-id}/tagged เพื่อแสดงโพสต์ที่แท็กเพจนี้ ผลลัพธ์จะรวมโพสต์จากเพจอื่นก็ต่อเมื่อเพจเหล่านั้นเป็นเพจที่แท้จริงsource สำหรับ /page/feed และ /page/posts สำหรับวิดีโอที่เพจเป็นเจ้าของเมื่อผู้ใช้ที่สร้างคำขอเป็นผู้ดูแลเพจที่เป็นเจ้าของนั้นเองการอ่านจากจุดเชื่อมโยงนี้จะให้ผลลัพธ์ที่อยู่ในรูปแบบ JSON:
{ "
data": [], "paging": {}, "summary": {} }
datapagingsummaryข้อมูลโดยรวมเกี่ยวกับจุดเชื่อมโยง เช่น จำนวนนับ ระบุช่องกรอกข้อมูลเพื่อดึงข้อมูลในพารามิเตอร์สรุป (เช่น summary=total_count)
| ช่อง | คำอธิบาย |
|---|---|
total_countunsigned int32 | total_count |
| ข้อผิดพลาด | คำอธิบาย |
|---|---|
| 80001 | There have been too many calls to this Page account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting. |
| 100 | Invalid parameter |
| 200 | Permissions error |
| 210 | User not visible |
| 190 | Invalid OAuth 2.0 Access Token |
| 283 | That action requires the extended permission pages_read_engagement and/or pages_read_user_content and/or pages_manage_ads and/or pages_manage_metadata |
| 104 | Incorrect signature |
| 2500 | Error parsing graph query |