إصدار ‏‎Graph API‎‏

/{object-id}/sharedposts

يوضح هذا المرجع عنصر الربط /sharedposts الشائع في عُقد Graph API المتعددة. تتطابق البنية وعمليات التشغيل في كل عقدة. تمتلك الكائنات التالية عنصر الربط sharedposts:

  • PagePost
  • Post
  • User

القراءة

الأذونات

  • رمز وصول مستخدم يتضمن الإذن user_posts، للشخص الذي يمكنه عرض المنشور بعد وضع إعدادات الخصوصية في الاعتبار. سيتم إرجاع المنشور إذا (أ) أنشأ التطبيق المنشور أو (ب) منح منشئ المنشور الإذن user_posts للتطبيق.

أذونات الميزة

الاسمالوصف

الوصول إلى المحتوى العام للصفحة

هذا إذن ميزة مطلوب.

التقييدات

  • /{album-id}/sharedposts غير متوفر.
  • تم إيقاف استخدام نقطة النهاية GET /{photo-id}/sharedposts في الإصدار 8.0 والإصدارات الأحدث.

مثال

مستكشف Graph API
GET /v19.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
}];

الحقول

قائمة كائنات المنشور التي تمثل كل عمليات المشاركة.

النشر

يتعذر عليك نشر عمليات المشاركة لكائن ما باستخدام Graph API.

الحذف

يتعذر حذف عمليات المشاركة لكائن ما باستخدام Graph API.