Represents a Facebook user. 閱讀中. Get fields and edges on a User. 新粉絲專頁體驗.
圖形API總覽GetStartedGuidesServer-SentEvents變更紀錄功能參考資料權限參考資料Reference圖形API版本v12.0UserRepresentsaFacebookuser.
閱讀中GetfieldsandedgesonaUser.
新粉絲專頁體驗Thisendpointissupportedfor新粉絲專頁體驗.範例HTTPPHPSDKJavaScriptSDKAndroidSDKiOSSDKcURLGraphAPIExplorerGET/v12.0/{person-id}/HTTP/1.1
Host:graph.facebook.com/*PHPSDKv5.0.0*/
/*maketheAPIcall*/
try{
//Returnsa`Facebook\FacebookResponse`object
$response=$fb->get(
'/{person-id}/',
'{access-token}'
);
}catch(Facebook\Exceptions\FacebookResponseException$e){
echo'Graphreturnedanerror:'.$e->getMessage();
exit;
}catch(Facebook\Exceptions\FacebookSDKException$e){
echo'FacebookSDKreturnedanerror:'.$e->getMessage();
exit;
}
$graphNode=$response->getGraphNode();
/*handletheresult*//*maketheAPIcall*/
FB.api(
"/{person-id}/",
function(response){
if(response&&!response.error){
/*handletheresult*/
}
}
);/*maketheAPIcall*/
newGraphRequest(
AccessToken.getCurrentAccessToken(),
"/{person-id}/",
null,
HttpMethod.GET,
newGraphRequest.Callback(){
publicvoidonCompleted(GraphResponseresponse){
/*handletheresult*/
}
}
).executeAsync();/*maketheAPIcall*/
FBSDKGraphRequest*request=[[FBSDKGraphRequestalloc]
initWithGraphPath:@"/{person-id}/"
parameters:params
HTTPMethod:@"GET"];
[requeststartWithCompletionHandler:^(FBSDKGraphRequestConnection*connection,
idresult,
NSError*error){
//Handletheresult
}];curl-XGET-G\
-d'access_token='\
https://graph.facebook.com/v12.0/{person-id}/如果想瞭解如何使用圖形API,請參閱我們的使用圖形API指南。
DefaultPublicProfileFields
Thepublic_profilepermissionallowsappstoreadthefollowingfields:
id
first_name
last_name
middle_name
name
name_format
picture
short_name
參數這個端點沒有任何參數。
欄位欄位說明idnumericstringTheappuser'sApp-ScopedUserID.ThisIDisuniquetotheappandcannotbeusedbyotherapps.
核心aboutstringReturnsnodataasofApril4,2018.
age_rangeAgeRangeTheagesegmentforthispersonexpressedasaminimumandmaximumage.Forexample,morethan18,lessthan21.
核心birthdaystringTheperson'sbirthday.Thisisafixedformatstring,likeMM/DD/YYYY.However,peoplecancontrolwhocanseetheyeartheywerebornseparatelyfromthemonthanddaysothisstringcanbeonlytheyear(YYYY)orthemonth+day(MM/DD)
核心educationlistReturnsnodataasofApril4,2018.
emailstringTheUser'sprimaryemailaddresslistedontheirprofile.Thisfieldwillnotbereturnedifnovalidemailaddressisavailable.
核心favorite_athleteslistAthletestheUserlikes.
favorite_teamslistSportsteamstheUserlikes.
first_namestringTheperson'sfirstname
核心genderstringThegenderselectedbythisperson,maleorfemale.Ifthegenderissettoacustomvalue,thisvaluewillbebasedoffofthepreferredpronoun;itwillbeomittedifthepreferredpronounisneutral
核心hometownPageTheperson'shometown
inspirational_peoplelistTheperson'sinspirationalpeople
installedboolIstheappmakingtherequestinstalled
is_guest_userboolifthecurrentuserisaguestuser.shouldalwaysreturnfalse.
languageslistFacebookPagesrepresentingthelanguagesthispersonknows
last_namestringTheperson'slastname
核心linkstringAlinktotheperson'sTimeline.ThelinkwillonlyresolveifthepersonclickingthelinkisloggedintoFacebookandisafriendofthepersonwhoseprofileisbeingviewed.
核心local_news_megaphone_dismiss_statusboolDisplaymegaphoneforlocalnewsbookmark
已停用local_news_subscription_statusboolDailylocalnewsnotification
已停用localestringTheperson'slocale
核心已停用locationPageTheperson'scurrentlocationasenteredbythemontheirprofile.Thisfieldrequirestheuser_locationpermission.
核心meeting_forlistWhatthepersonisinterestedinmeetingfor
middle_namestringTheperson'smiddlename
核心namestringTheperson'sfullname
核心預設name_formatstringTheperson'snameformattedtocorrectlyhandleChinese,Japanese,orKoreanordering
politicalstringReturnsnodataasofApril4,2018.
quotesstringTheperson'sfavoritequotes
relationship_statusstringReturnsnodataasofApril4,2018.
shared_login_upgrade_required_bydatetimeThetimethatthesharedloginneedstobeupgradedtoBusinessManagerby
significant_otherUserTheperson'ssignificantother
sportslistSportsplayedbytheperson
supports_donate_button_in_live_videoboolWhethertheusercanaddaDonateButtontotheirLiveVideos
third_party_idstringAstringcontainingananonymous,uniqueidentifierfortheUser,forusewiththird-parties.Deprecatedforversions3.0+.AppsusingolderversionsoftheAPIcangetthisfielduntilJanuary8,2019.AppsinstalledbytheUseronorafterMay1st,2018,cannotgetthisfield.
已停用timezonefloat(min:-24)(max:24)Theperson'scurrenttimezoneoffsetfromUTC
核心已停用token_for_businessstringAtokenthatisthesameacrossabusiness'sapps.Accesstothistokenrequiresthatthepersonbeloggedintoyourapporhavearoleonyourapp.Thistokenwillchangeifthebusinessowningtheappchanges
updated_timedatetimeUpdatedtime
已停用verifiedboolIndicateswhethertheaccounthasbeenverified.Thisisdistinctfromtheis_verifiedfield.Someoneisconsideredverifiediftheytakeanyofthefollowingactions:
*Registerformobile
*ConfirmtheiraccountviaSMS
*Enteravalidcreditcard
已停用video_upload_limitsVideoUploadLimitsVideouploadlimits
websitestringReturnsnodataasofApril4,2018.
關係連線關係連線說明accountsPagestheUserhasaroleon.
ad_studiesAdstudiesthatthisUser'scanview.
adaccountsTheadvertisingaccountstheUsercanaccess.
apprequestformerrecipientsApprequests
assigned_ad_accountsAdaccountsthatareassignedtothisbusinessscopeduser
assigned_business_asset_groupsBusinessassetgroupsthatareassigntothisbusinessscopeduser
assigned_pagesPagesthatareassignedtothisbusinessscopeduser
assigned_product_catalogsProductcatalogsthatareassignedtothisbusinessscopeduser
business_usersBusinessuserscorrespondingtotheuser
businessesBusinessesassociatedwiththeuser
custom_labelscustom_labels
feedThepostsandlinkspublishedbythispersonorothersontheirprofile
ids_for_appsBusinessescanclaimownershipofmultipleappsusingBusinessManager.ThisedgereturnsthelistofIDsthatthisuserhasinanyofthoseotherapps
ids_for_businessBusinessescanclaimownershipofmultipleappsusingBusinessManager.ThisedgereturnsthelistofIDsthatthisuserhasinanyofthoseotherapps
live_videosLivevideosfromthisperson
payment.subscriptionsPaymentsubscriptions
personal_ad_accountsTheadvertisingaccountstowhichthispersonhaspersonalaccess
pictureTheperson'sprofilepicture
核心rich_media_documentsAlistofrichmediadocumentsbelongingtoPagesthattheuserhasadvertiserpermissionson
videosVideosthepersonistaggedinoruploaded
ErrorCodes錯誤說明100Invalidparameter190InvalidOAuth2.0AccessToken200Permissionserror459Thesessionisinvalidbecausetheuserhasbeencheckpointed368Theactionattemptedhasbeendeemedabusiveorisotherwisedisallowed613Callstothisapihaveexceededtheratelimit.2500Errorparsinggraphquery210Usernotvisible110Invaliduserid80004Therehavebeentoomanycallstothisad-account.Waitabitandtryagain.Formoreinfo,pleaserefertohttps://developers.facebook.com/docs/graph-api/overview/rate-limiting.建立中你無法在此端點執行此操作。
更新中你可以向/{user_id}提出發佈要求,以更新a User。
參數參數說明emoji_color_prefint64emojicolorpreference.
firstnamestringThisperson'sfirstname
lastnamestringThisperson'slastname
local_news_megaphone_dismiss_statusenum{YES,NO}Dismisseslocalnewsmegaphone
local_news_subscription_statusenum{STATUS_ON,STATUS_OFF}Preferenceforsettinglocalnewsnotifications
namestringUsedfortestaccountsonly.Nameforthisaccount
passwordstringUsedfortestaccountsonly.Passwordforthisaccount
傳回類型此端點支援寫入後讀取功能,並將讀取你傳送POST的節點。
Struct{success:bool,}ErrorCodes錯誤說明459Thesessionisinvalidbecausetheuserhasbeencheckpointed102Sessionkeyinvalidornolongervalid100Invalidparameter200Permissionserror240Desktopapplicationscannotcallthisfunctionforotherusers190InvalidOAuth2.0AccessToken368Theactionattemptedhasbeendeemedabusiveorisotherwisedisallowed210Usernotvisible270ThisAdsAPIrequestisnotallowedforappswithdevelopmentaccesslevel(Developmentaccessisbydefaultforallapps,pleaserequestforupgrade).Makesurethattheaccesstokenbelongstoauserthatisbothadminoftheappandadminoftheadaccount你可以向/{user_id}/game_items提出發佈要求,以更新a User。
參數參數說明actionenum{MARK,CONSUME,DROP}Actiontotriggeronaninventoryitem
必填app_idapplicationIDOverridestheapplicationfromtheuseraccesstoken.Mustbeanotherappwithinthebusiness
drop_table_idgame_drop_tableIDWhatlootdroptabletotriggerfortheDROPaction
ext_idstringExternalidassignedbythegamefortheitem
item_idgame_itemIDWhatitemidtotargetfortheMARKandCONSUMEactions
quantityint64SELF_EXPLANATORY
傳回類型Struct{id:unsignedinteger,count:unsignedinteger,created:timestamp,item_def:string,status:enum,updated:timestamp,ext_id:string,}ErrorCodes錯誤說明100Invalidparameter你可以向/{custom_audience_id}/users提出發佈要求,以更新a User。
範例HTTPPHPSDKJavaScriptSDKAndroidSDKiOSSDKcURLGraphAPIExplorerPOST/v12.0//usersHTTP/1.1
Host:graph.facebook.com
payload=%7B%22schema%22%3A%5B%22EMAIL%22%2C%22LOOKALIKE_VALUE%22%5D%2C%22data%22%3A%5B%5B%229b431636bd164765d63c573c346708846af4f68fe3701a77a3bdd7e7e5166254%22%2C44.5%5D%2C%5B%228cc62c145cd0c6dc444168eaeb1b61b351f9b1809a579cc9b4c9e9d7213a39ee%22%2C140%5D%2C%5B%224eaf70b1f7a797962b9d2a533f122c8039012b31e0a52b34a426729319cb792a%22%2C0%5D%2C%5B%2298df8d46f118f8bef552b0ec0a3d729466a912577830212a844b73960777ac56%22%2C0.9%5D%5D%7D/*PHPSDKv5.0.0*/
/*maketheAPIcall*/
try{
//Returnsa`Facebook\FacebookResponse`object
$response=$fb->post(
'//users',
array(
'payload'=>'{"schema":["EMAIL","LOOKALIKE_VALUE"],"data":[["9b431636bd164765d63c573c346708846af4f68fe3701a77a3bdd7e7e5166254",44.5],["8cc62c145cd0c6dc444168eaeb1b61b351f9b1809a579cc9b4c9e9d7213a39ee",140],["4eaf70b1f7a797962b9d2a533f122c8039012b31e0a52b34a426729319cb792a",0],["98df8d46f118f8bef552b0ec0a3d729466a912577830212a844b73960777ac56",0.9]]}',
),
'{access-token}'
);
}catch(Facebook\Exceptions\FacebookResponseException$e){
echo'Graphreturnedanerror:'.$e->getMessage();
exit;
}catch(Facebook\Exceptions\FacebookSDKException$e){
echo'FacebookSDKreturnedanerror:'.$e->getMessage();
exit;
}
$graphNode=$response->getGraphNode();
/*handletheresult*//*maketheAPIcall*/
FB.api(
"//users",
"POST",
{
"payload":"{\"schema\":[\"EMAIL\",\"LOOKALIKE_VALUE\"],\"data\":[[\"9b431636bd164765d63c573c346708846af4f68fe3701a77a3bdd7e7e5166254\",44.5],[\"8cc62c145cd0c6dc444168eaeb1b61b351f9b1809a579cc9b4c9e9d7213a39ee\",140],[\"4eaf70b1f7a797962b9d2a533f122c8039012b31e0a52b34a426729319cb792a\",0],[\"98df8d46f118f8bef552b0ec0a3d729466a912577830212a844b73960777ac56\",0.9]]}"
},
function(response){
if(response&&!response.error){
/*handletheresult*/
}
}
);Bundleparams=newBundle();
params.putString("payload","{\"schema\":[\"EMAIL\",\"LOOKALIKE_VALUE\"],\"data\":[[\"9b431636bd164765d63c573c346708846af4f68fe3701a77a3bdd7e7e5166254\",44.5],[\"8cc62c145cd0c6dc444168eaeb1b61b351f9b1809a579cc9b4c9e9d7213a39ee\",140],[\"4eaf70b1f7a797962b9d2a533f122c8039012b31e0a52b34a426729319cb792a\",0],[\"98df8d46f118f8bef552b0ec0a3d729466a912577830212a844b73960777ac56\",0.9]]}");
/*maketheAPIcall*/
newGraphRequest(
AccessToken.getCurrentAccessToken(),
"//users",
params,
HttpMethod.POST,
newGraphRequest.Callback(){
publicvoidonCompleted(GraphResponseresponse){
/*handletheresult*/
}
}
).executeAsync();NSDictionary*params=@{
@"payload":@"{\"schema\":[\"EMAIL\",\"LOOKALIKE_VALUE\"],\"data\":[[\"9b431636bd164765d63c573c346708846af4f68fe3701a77a3bdd7e7e5166254\",44.5],[\"8cc62c145cd0c6dc444168eaeb1b61b351f9b1809a579cc9b4c9e9d7213a39ee\",140],[\"4eaf70b1f7a797962b9d2a533f122c8039012b31e0a52b34a426729319cb792a\",0],[\"98df8d46f118f8bef552b0ec0a3d729466a912577830212a844b73960777ac56\",0.9]]}",
};
/*maketheAPIcall*/
FBSDKGraphRequest*request=[[FBSDKGraphRequestalloc]
initWithGraphPath:@"//users"
parameters:params
HTTPMethod:@"POST"];
[requeststartWithCompletionHandler:^(FBSDKGraphRequestConnection*connection,
idresult,
NSError*error){
//Handletheresult
}];curl-XPOST\
-F'payload={
"schema":[
"EMAIL",
"LOOKALIKE_VALUE"
],
"data":[
[
"9b431636bd164765d63c573c346708846af4f68fe3701a77a3bdd7e7e5166254",
44.5
],
[
"8cc62c145cd0c6dc444168eaeb1b61b351f9b1809a579cc9b4c9e9d7213a39ee",
140
],
[
"4eaf70b1f7a797962b9d2a533f122c8039012b31e0a52b34a426729319cb792a",
0
],
[
"98df8d46f118f8bef552b0ec0a3d729466a912577830212a844b73960777ac56",
0.9
]
]
}'\
-F'access_token='\
https://graph.facebook.com/v12.0//users如果想瞭解如何使用圖形API,請參閱我們的使用圖形API指南。
參數參數說明payloadObjectPayloadrepresentinguserstoadd
schemastringEMAIL_SHA256,PHONE_SHA256,MOBILE_ADVERTISER_ID.Onecanalsopassanarrayofmultiplekeysformulti-keymatch.Supportedkeytypesincludes:EXTERN_IDEMAILPHONEGENDOBYDOBMDOBDLNFNFICTSTZIPMADIDCOUNTRYThemulti-keyarrayisoftheform["EMAIL","LN","FN","ZIP"]
is_rawbooleanIsthekeyraw?Ifthekeysarecombinationalkeyslike"LN_FN_ZIP",setthistofalse,otherwisesetthistotrue.Defaulttofalse
datalistArraywithusersdata.Ifthemulti-keyfeatureisused,atwo-dimensionalarrayoftheform[["","","",""],["","","",""]]shouldbepassed.Incaseakeyisunknown,itshouldbeleftblank.
app_idslistAppidsusedbytheusersbeinguploaded.ThisfieldisrequiredwhenschemaisaFacebookUIDandtheIDswerecollectedbyanAppintegration.e.g.[1234,5678]
page_idslistPageidsusedbytheusersbeinguploaded.ThisfieldisrequiredwhenschemaisaFacebookUIDandtheIDswerecollectedbyaPagewebhookintegration.e.g.[1234,5678]
data_sourceObjectIndicatesbywhichmethodthecustomaudiencewascreated,definedbythetypeandsubtypeofthedata_source
typeenum{UNKNOWN,FILE_IMPORTED,EVENT_BASED,SEED_BASED,THIRD_PARTY_IMPORTED,COPY_PASTE,CONTACT_IMPORTER,HOUSEHOLD_AUDIENCE}Typeofthecustomaudience
sub_typeenum{ANYTHING,NOTHING,HASHES,USER_IDS,HASHES_OR_USER_IDS,MOBILE_ADVERTISER_IDS,EXTERNAL_IDS,MULTI_HASHES,TOKENS,EXTERNAL_IDS_MIX,HOUSEHOLD_EXPANSION,WEB_PIXEL_HITS,MOBILE_APP_EVENTS,MOBILE_APP_COMBINATION_EVENTS,VIDEO_EVENTS,WEB_PIXEL_COMBINATION_EVENTS,PLATFORM,MULTI_DATA_EVENTS,IG_BUSINESS_EVENTS,STORE_VISIT_EVENTS,INSTANT_ARTICLE_EVENTS,FB_EVENT_SIGNALS,ENGAGEMENT_EVENT_USERS,FACEBOOK_WIFI_EVENTS,CUSTOM_AUDIENCE_USERS,PAGE_FANS,CONVERSION_PIXEL_HITS,APP_USERS,S_EXPR,DYNAMIC_RULE,CAMPAIGN_CONVERSIONS,WEB_PIXEL_HITS_CUSTOM_AUDIENCE_USERS,MOBILE_APP_CUSTOM_AUDIENCE_USERS,COMBINATION_CUSTOM_AUDIENCE_USERS,VIDEO_EVENT_USERS,FB_PIXEL_HITS,IG_PROMOTED_POST,PLACE_VISITS,OFFLINE_EVENT_USERS,EXPANDED_AUDIENCE,SEED_LIST,PARTNER_CATEGORY_USERS,PAGE_SMART_AUDIENCE,MULTICOUNTRY_COMBINATION,PLATFORM_USERS,MULTI_EVENT_SOURCE,SMART_AUDIENCE,LOOKALIKE_PLATFORM,SIGNAL_SOURCE,MAIL_CHIMP_EMAIL_HASHES,CONSTANT_CONTACTS_EMAIL_HASHES,COPY_PASTE_EMAIL_HASHES,CUSTOM_DATA_TARGETING,CONTACT_IMPORTER,DATA_FILE}Subtypeofthecustomaudience
sessionObjectInformationaboutthesession.Sessionsareusedwhenyou
havealotofuserstoupload.Forexample,ifyouhave1millionusers
toupload,youneedtosplitthemintoatleast100requestsbecause
eachrequestcanonlytake10kusers.Specifythesessioninfosothat
youcantrackifthesessionhasfinishedornot.
session_idint64Advertisergeneratedsessionidentifier,usedtotrackthesession.Needstobeuniqueinthesameadaccount.
estimated_num_totalint64Estimatedtotalnumofuserstobeuploadedinthissession,usedbyFacebooksystemstobetterprocessthissession.
batch_seqint64A1basedsequencenumbertoidentifytherequestinthesession.
last_batch_flagbooleantruemeanthisrequestisthelastrequestinthissession.YoumustmarkthelastrequestotherwiseFacebookdoesn'tknowthesessionhasended
傳回類型此端點支援寫入後讀取功能,並將讀取你傳送POST的節點。
Struct{audience_id:numericstring,session_id:numericstring,num_received:int32,num_invalid_entries:int32,invalid_entry_samples:Map{string:string},}ErrorCodes錯誤說明200Permissionserror100Invalidparameter2650Failedtoupdatethecustomaudience368Theactionattemptedhasbeendeemedabusiveorisotherwisedisallowed294Managingadvertisementsrequiresanaccesstokenwiththeextendedpermissionforads_management190InvalidOAuth2.0AccessToken105Thenumberofparametersexceededthemaximumforthisoperation刪除中Deleteatestuser你可以向/{user_id}提出刪除要求,以刪除a User。
參數這個端點沒有任何參數。
傳回類型Struct{success:bool,}ErrorCodes錯誤說明2903Cannotdeletethistestaccount240Desktopapplicationscannotcallthisfunctionforotherusers100Invalidparameter2904CannotdeletetheOGTestUser200Permissionserror你可以向/{custom_audience_id}/users提出刪除要求,中斷a User和a CustomAudience的關聯。
參數參數說明payloadObjectPayloadrepresentinguserstodelete
schemastringEMAIL_SHA256,PHONE_SHA256,MOBILE_ADVERTISER_ID.Onecanalsopassanarrayofmultiplekeysformulti-keymatch.Supportedkeytypesincludes:EXTERN_IDEMAILPHONEGENDOBYDOBMDOBDLNFNFICTSTZIPMADIDCOUNTRYThemulti-keyarrayisoftheform["EMAIL","LN","FN","ZIP"]
is_rawbooleanIsthekeyraw?Ifthekeysarecombinationalkeyslike"LN_FN_ZIP",setthistofalse,otherwisesetthistotrue.Defaulttofalse
datalistArraywithusersdata.Ifthemulti-keyfeatureisused,atwo-dimensionalarrayoftheform[["","","",""],["","","",""]]shouldbepassed.Incaseakeyisunknown,itshouldbeleftblank.
app_idslistAppidsusedbytheusersbeinguploaded.ThisfieldisrequiredwhenschemaisaFacebookUIDandtheIDswerecollectedbyanAppintegration.e.g.[1234,5678]
page_idslistPageidsusedbytheusersbeinguploaded.ThisfieldisrequiredwhenschemaisaFacebookUIDandtheIDswerecollectedbyaPagewebhookintegration.e.g.[1234,5678]
data_sourceObjectIndicatesbywhichmethodthecustomaudiencewascreated,definedbythetypeandsubtypeofthedata_source
typeenum{UNKNOWN,FILE_IMPORTED,EVENT_BASED,SEED_BASED,THIRD_PARTY_IMPORTED,COPY_PASTE,CONTACT_IMPORTER,HOUSEHOLD_AUDIENCE}Typeofthecustomaudience
sub_typeenum{ANYTHING,NOTHING,HASHES,USER_IDS,HASHES_OR_USER_IDS,MOBILE_ADVERTISER_IDS,EXTERNAL_IDS,MULTI_HASHES,TOKENS,EXTERNAL_IDS_MIX,HOUSEHOLD_EXPANSION,WEB_PIXEL_HITS,MOBILE_APP_EVENTS,MOBILE_APP_COMBINATION_EVENTS,VIDEO_EVENTS,WEB_PIXEL_COMBINATION_EVENTS,PLATFORM,MULTI_DATA_EVENTS,IG_BUSINESS_EVENTS,STORE_VISIT_EVENTS,INSTANT_ARTICLE_EVENTS,FB_EVENT_SIGNALS,ENGAGEMENT_EVENT_USERS,FACEBOOK_WIFI_EVENTS,CUSTOM_AUDIENCE_USERS,PAGE_FANS,CONVERSION_PIXEL_HITS,APP_USERS,S_EXPR,DYNAMIC_RULE,CAMPAIGN_CONVERSIONS,WEB_PIXEL_HITS_CUSTOM_AUDIENCE_USERS,MOBILE_APP_CUSTOM_AUDIENCE_USERS,COMBINATION_CUSTOM_AUDIENCE_USERS,VIDEO_EVENT_USERS,FB_PIXEL_HITS,IG_PROMOTED_POST,PLACE_VISITS,OFFLINE_EVENT_USERS,EXPANDED_AUDIENCE,SEED_LIST,PARTNER_CATEGORY_USERS,PAGE_SMART_AUDIENCE,MULTICOUNTRY_COMBINATION,PLATFORM_USERS,MULTI_EVENT_SOURCE,SMART_AUDIENCE,LOOKALIKE_PLATFORM,SIGNAL_SOURCE,MAIL_CHIMP_EMAIL_HASHES,CONSTANT_CONTACTS_EMAIL_HASHES,COPY_PASTE_EMAIL_HASHES,CUSTOM_DATA_TARGETING,CONTACT_IMPORTER,DATA_FILE}Subtypeofthecustomaudience
sessionObjectInformationaboutthesession.Sessionsareusedwhenyou
havealotofuserstoupload.Forexample,ifyouhave1millionusers
toupload,youneedtosplitthemintoatleast100requestsbecause
eachrequestcanonlytake10kusers.Specifythesessioninfosothat
youcantrackifthesessionhasfinishedornot.
session_idint64Advertisergeneratedsessionidentifier,usedtotrackthesession.Needstobeuniqueinthesameadaccount.
estimated_num_totalint64Estimatedtotalnumofuserstobeuploadedinthissession,usedbyFacebooksystemstobetterprocessthissession.
batch_seqint64A1basedsequencenumbertoidentifytherequestinthesession.
last_batch_flagbooleantruemeanthisrequestisthelastrequestinthissession.YoumustmarkthelastrequestotherwiseFacebookdoesn'tknowthesessionhasended
傳回類型Struct{audience_id:numericstring,session_id:numericstring,num_received:int32,num_invalid_entries:int32,invalid_entry_samples:Map{string:string},}ErrorCodes錯誤說明80003Therehavebeentoomanycallstothisad-account.Waitabitandtryagain.Formoreinfo,pleaserefertohttps://developers.facebook.com/docs/graph-api/overview/rate-limiting.200Permissionserror100Invalidparameter2650Failedtoupdatethecustomaudience294Managingadvertisementsrequiresanaccesstokenwiththeextendedpermissionforads_management你可以向/{user_id}/businesses提出刪除要求,中斷a User和a User的關聯。
參數參數說明businessnumericstringorintegerSELF_EXPLANATORY
傳回類型Struct{success:bool,}ErrorCodes錯誤說明3914Itlookslikeyou'retryingtoremovethelastadminfromthisBusinessManager.AtleastoneadminisrequiredinBusinessManager.你可以向/act_{ad_account_id}/assigned_users提出刪除要求,中斷a User和an AdAccount的關聯。
參數參數說明userUIDBusinessuseridorsystemuserid
必填傳回類型Struct{success:bool,}ErrorCodes錯誤說明3919Therewasanunexpectedtechnicalissue.Pleasetryagain.100Invalidparameter