/{object-id}/sharedpostsReferensi ini menggambarkan edge /sharedposts yang umum untuk beberapa node Graph API. Struktur dan operasinya sama untuk setiap node. Objek berikut ini memiliki edge sharedposts:
user_posts, untuk seseorang yang dapat melihat postingan setelah pengaturan privasi diperhitungkan. Postingan akan dikembalikan jika (a) aplikasi yang tadinya membuat postingan itu atau (b) kreator postingan telah memberi aplikasi izin user_posts.| Nama | Deskripsi |
|---|---|
Akses Konten Publik Halaman | Ini adalah izin fitur wajib. |
/{album-id}/sharedposts tidak tersedia.GET /{photo-id}/sharedposts dihentikan di v8.0+.GET /v25.0/{object-id}/sharedposts 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(
'/{object-id}/sharedposts',
'{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(
"/{object-id}/sharedposts",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{object-id}/sharedposts",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{object-id}/sharedposts"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];Daftar objek Postingan mewakili setiap berbagi.
Anda tidak dapat menerbitkan berbagi objek menggunakan Graph API.
Anda tidak dapat menghapus berbagi objek menggunakan Graph API.