Posts tagged with facebook

I want to create an API to basically call conversion API based on the

  1. to user access token through embedded signup
  2. manually select event type
  3. get the pages which the user will select through the access token the above are all working properly, but now I also want to get the pixels based on the page selected so I have the page id, access_token but I am unable to get any API that gives me the pixels as per the page.

I have tried:

  1. https://graph.facebook.com/v21.0/me/adaccounts?fields=business_name,name,account_status,balance,currency,adspixels{name,code},amount_spent,min_daily_budget,insights&access_token=

    But it returns me: Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api"

  2. https://graph.facebook.com/v21.0/ad_account_id/adspixels

    but in this I have manually added the ad account id and it still didn't work, but I want to be able to call it dynamically.

I created a new app, and did all the required steps; system users added my personal number as a test number for getting messages and verified it. On making a curl call it does say message sent but I did not recieve the message. I read here that I need to initiate the conversation, I added the contact and sent a "Hi", first it was not delivered at all, second,it did not send any message. I am trying to use FlowBridge to integrate Voiceflow but not working. Below is the Hello World curl request:

 curl -i -X POST \   https://graph.facebook.com/v21.0/505794375953552/messages \   -H 'Authorization: Bearer xxxxxxxx' \   -H 'Content-Type: application/json' \   -d '{ "messaging_product": "whatsapp", "to": "+923009290538", "type": "template", "template": { "name": "hello_world", "language": { "code": "en_US" } } }' HTTP/2 200  content-type: application/json; charset=UTF-8 vary: Origin x-business-use-case-usage: {"476948972175537":[{"type":"whatsapp","call_count":1,"total_cputime":1,"total_time":1,"estimated_time_to_regain_access":0}]} access-control-allow-origin: * facebook-api-version: v21.0 strict-transport-security: max-age=15552000; preload pragma: no-cache cache-control: private, no-cache, no-store, must-revalidate expires: Sat, 01 Jan 2000 00:00:00 GMT x-fb-request-id: AzyBpSOlGk337z5dcfK5xz9 x-fb-trace-id: HXfstE61zeT x-fb-rev: 1019058758 x-fb-debug: I+v2luvdeTX0UqrN91y82WqYcDyc5VVff3pfLc+7t1hEjZePGLoQ+M61pCNjx9Kuy1ZuymARjsB3c9eNPBeYKA== content-length: 207 date: Mon, 23 Dec 2024 05:14:56 GMT x-fb-connection-quality: EXCELLENT; q=0.9, rtt=23, rtx=0, c=10, mss=1380, tbw=3394, tp=-1, tpl=-1, uplat=540, ullat=0 alt-svc: h3=":443"; ma=86400 {"messaging_product":"whatsapp","contacts":[{"input":"+923xxx8","wa_id":"xxx"}],"messages":[{"id":"wamid.HBgMOTIzMDA5MjkwNTM4FQIAERgSQkVBMEJGRDAzQzU3NUYwNUIxAA==","message_status":"accepted"}]}%    

Jus to clarify my initial "Hi" message still has a single tick

I'm encountering an issue with the Facebook Graph API where one of my users, User Chris, cannot list his Facebook pages despite being an administrator in Business Manager. Here's the breakdown:

Users:

User Hana

Access Token Permissions:

  • email
  • pages_show_list
  • ads_management
  • business_management
  • leads_retrieval
  • pages_read_engagement
  • pages_manage_metadata
  • pages_manage_ads
  • public_profile

Behavior: Successfully lists pages using GET https://graph.facebook.com/v17.0/me/accounts

User Chris

Access Token Permissions:

  • email
  • pages_show_list
  • ads_management
  • pages_read_engagement
  • pages_manage_metadata
  • pages_manage_ads
  • public_profile
  • Missing Permissions:
  • business_management
  • leads_retrieval

Behavior: Fails to list pages using GET https://graph.facebook.com/v17.0/me/accounts

Additional Context:

User Chris is an administrator in Business Manager, and his pages are managed through it. When User Hana was directly added as an administrator to a page outside of Business Manager, that page started appearing in her API results. Both users obtain their access tokens via the standard OAuth flow, and the application has been approved for the necessary permissions except for User Chris's token, which lacks business_management and leads_retrieval.

Steps Taken So Far:

  • Verified User Chris's role in Business Manager.
  • Ensured the application requests all necessary permissions during authentication.
  • Used the /debug_token endpoint to confirm User Chris's token permissions.
  • Attempted to re-authenticate User Chris to obtain a new token, but the missing permissions persist.

Question:

Is there a specific configuration or additional step required to ensure that administrators in Business Manager, like User Chris, have their access tokens include the business_management and leads_retrieval permissions?

I’m working with the Facebook Marketing API to analyze playable ads. While querying playable content, I only get access to two fields: "id" and "name"

I noticed that some SDKs (python) reference fields like source_url and source_zip. But even using that doesn't give me the source.

Here’s what I’ve done so far:

GET /v21.0/{ad_account_id}/adplayables ?fields=id,name,source_url,source_zip &access_token=<ACCESS_TOKEN> 

The above call only returns a list of playable assets with only the id and the name fields. No source fields

My Questions:

  1. Are the source_url and source_zip fields supported in the current API version?
  2. If not, is there any alternative way to retrieve the HTML source files for playable ads?
  3. Are there specific permissions or configurations required to access these fields, even as a page admin?