Profil Etkinlikleri
GET/v1/facebook/profile/events1 kredi
Bir Facebook sayfasının yaklaşan etkinliklerini ad, mekân, tarih metni ve başlangıç zamanıyla döndürür.
01Sorgu parametreleri
| Ad | Tür | Açıklama |
|---|---|---|
| urlzorunlu | string | Bir Facebook sayfası ya da profil URL'si, örneğin `https://www.facebook.com/NASA`. |
| cursoristeğe bağlı | string | Önceki sayfadaki `cursor` değeri. |
02İstek
curl "https://api.scrapesocial.ai/v1/facebook/profile/events?url=https%3A%2F%2Fwww.facebook.com%2Fbrickyardoldtown" \ -H "x-api-key: $SCRAPESOCIAL_KEY"
03Yanıtlar
API'nin gerçek yanıtları. Listeler 2 öğeye kısaltılmıştır.
GET /v1/facebook/profile/events?url=https%3A%2F%2Fwww.facebook.com%2Fbrickyardoldtown
{
"success": true,
"credits_remaining": 4980,
"credits_charged": 1,
"events": [
{
"id": "1599404908579946",
"__typename": "Event",
"name": "Eclipse at Brickyard",
"is_canceled": false,
"event_creator": {
"__typename": "User",
"__isEntity": "User",
"url": "https://www.facebook.com/brickyardoldtown",
"name": "Brickyard",
"id": "100066639371774"
},
"event_place": {
"__typename": "FreeformPlace",
"contextual_name": "Brickyard",
"location": {
"reverse_geocode": {
"city": "Wichita"
}
},
"__isNode": "FreeformPlace",
"id": "1435982685299697"
},
"day_time_sentence": "Fri, Oct 30 at 8:00 PM CDT",
"url": "https://www.facebook.com/events/1599404908579946/",
"gif_cover_photo": null,
"cover_video": null,
"__isEntity": "Event",
"event_kind": "PUBLIC_TYPE",
"is_happening_now": false,
"is_online_or_detected_online": false,
"is_past": false,
"start_timestamp": 1793408400
},
{
"id": "1790902472113859",
"__typename": "Event",
"name": "Halloween with DJ Sunshine at Brickyard 🎃👻🦄",
"is_canceled": false,
"event_creator": {
"__typename": "User",
"__isEntity": "User",
"url": "https://www.facebook.com/brickyardoldtown",
"name": "Brickyard",
"id": "100066639371774"
},
"event_place": {
"__typename": "Page",
"contextual_name": "Brickyard",
"location": {
"reverse_geocode": {
"city": "Wichita"
}
},
"__isNode": "Page",
"id": "274995392617693"
},
"day_time_sentence": "Sat, Oct 31 at 8:00 PM CDT",
"url": "https://www.facebook.com/events/1790902472113859/",
"gif_cover_photo": null,
"cover_video": null,
"__isEntity": "Event",
"event_kind": "PUBLIC_TYPE",
"is_happening_now": false,
"is_online_or_detected_online": false,
"is_past": false,
"start_timestamp": 1793494800
}
],
"cursor": null,
"has_next_page": false,
"total_count": 3
}Tüm uç noktalarda ortak
Her rota bunları döndürebilir: eksik ya da hatalı anahtar, biten kredi, yanıt vermeyen platform ya da bizim tarafımızdaki bir hata. Hiçbiri kredi harcamaz.
GET /v1/cosmos/profile?handle=design
{
"success": false,
"message": "Invalid API key"
}04Notlar
Yanıtta `cursor`, `has_next_page` ve `total_count` bulunur; sonraki sayfa için `cursor` değerini geri gönderin. Son sayfada `cursor` null'dır. Etkinliği olmayan bir sayfa ya da son sayfanın ötesine yapılan bir istek 0 krediyle boş liste döndürür. Oturum açılmadan Facebook bir sayfanın etkinliklerinden en fazla 8'ini gösterir, `total_count` daha yüksek olsa bile (zuck için 34): bu ilk sayfada `has_next_page: false` ve `cursor: null` döner.
05Hatalar ve krediler
Her hatada success: false ve gerçek bir HTTP durum kodu döner; kredi düşmez.
400missing_parameter
Zorunlu bir parametre eksik veya geçersiz.
403private_account
Hesap gizli ya da yaş kısıtlamalı.
404not_found
Böyle bir hesap yok.
503upstream_error
Platform şu an cevap vermiyor; tekrar deneyin.