Posts tagged with facebook-marketing-api

After uploading the photos I tried to create a ‘multiple-photos’ post with a Call To Action button attached to it, the issue is that the post is being created successfully when I don’t include the CTA but when I add the CTA button (2nd code block) the post is created without the photos, here below are the payloads I used on [POST] /{page_id}/feed.

//This will create the Post with Album as a type successfully {   "access_token": "<access_token>",   "published": 1,   "message": "An awesome Fb Post",   "attached_media": [     { "media_fbid": "<uploaded_photo_id>" },     { "media_fbid": "<uploaded_photo_id>" }   ] } 
//The Post will be created with the Call To Action Button but without photos {   "access_token": "<access_token>",   "published": 1,   "message": "An awesome Fb Post",   "attached_media": [     { "media_fbid": "<uploaded_photo_id>" },     { "media_fbid": "<uploaded_photo_id>" }   ],   "call_to_action": {     "type": "MESSAGE_PAGE",     "value": {       "app_destination": "MESSENGER",       "link": "https://fb.com/messenger_doc/"     }   } } 

Any Idea why the Post is not being created with both the images and the CTA button?

Thanks & I appreciate any feedback

I wish to use the created post in an AdCreative later on.

I am implementing the On Behalf Of flow as described here.

After Step 2's call to /<CLIENT_BM_ID>/access_token?scope=<scopes>&app_id=<APP_ID>&access_token=<PARTNER_BM_ADMIN_SYSTEM_USER_ACCESS_TOKEN>, I expect my app's system user Id to show up under the client's System Users (under Business Settings).

However, this never happens even though Step 2 returned the access_token as specified by the document.

How do I create a system user under the client's business manager?

When I call /me/accounts with the access token of the system user I created, it returns a page which I have access to (the one I connected in Step 4. However, making calls using the page_token retrieved result in the error:

"Cannot call API for on behalf of user :

The app I'm using is a test app.

My main question is how do I give my system user access to the client's assets?

Response example not showing conversions:

I'm trying to retrieve some ads insights so I can use them in my custom dashboard, everything is good but anything is related to conversions(results) is not returning in response. I gave all permissions to the access token and still no results.

What's the problem and how can I get this conversions/leads/results?

this is the required permissions for reading ads: read_insights, ads_management, ads_read, business_management, leads_retrieval. all of them included in the access token.

I have used Facebook Login dialog with the correct permission and gotten access to a person's business accounts. I received a code after the login process and exchanged it using the /oauth/access_token endpoint to receive a system access token (which does not expire).

I now want to get the business IDs of the businesses that the person using the Facebook Login dialog gave me access to, so that I can link their business to mine using the "on behalf of" approach (I'm the partner, they are the client) .

However, for me to do that I require access to their business ID. How do I get that business ID? I know there is an API which returns all business IDs that I (the partenr) has access to, but I want the one that they just gave me access to using the Facebook Login dialog box. How can I do that?

the problem i have is that sync phone numbers through api cannot be done except if we hashed those phone numbers, when we hash those phone numbers FB will not be able to recognize and match the users and in the estimated audience size we will have below 1000 always and size will be always ---, i tried to change the format of the phone numbers and make them without + sign but it gave the same result unfortunately. i thought that maybe the phone numbers we are uploading has no FB accounts and because of that FB is not able to recognize them but when i uploaded them manually without hashing to FB audience list using FB panel there was matching and i got numbers in the estimated audience size when i tried to hash those same phone numbers and uploaded them manually but hashed to an audience list in FB panel i got the same issue (no recognition) i am hashing using the same method we are using for email (with email there is no issues and everything works as expected) i am using SHA256 for hashing as FB suggested in their documentation. and i am sending phone numbers with country code as FB suggests in their documentation so basically i am doing everything as they listed in their documentation but we are getting no fulfilling or satisfying results with matching. (PS: i am sending all the users and FB is not giving any errors while uploading those users.).

i tried to change the format of the uploaded phone numbers (i uploaded with and without + sign), i am using php laravel in my main project but i tried to hash and upload through golang but i got the same result. also i am normalizing the phone numbers as they listed in the documentation i am sending only numbers without any symbols and leading zeros.

i expect to have audience size when phone numbers uploaded similar to what it happen when emails are uploaded to an audience list.

audience size after upload to audience list manually

audience size after upload to audience list through api