Posts under category facebook-graph-api

We developed our own platform to schedule Instagram Posts via the Instagram Graph API.

It's working fine but we can't find a way to add linebreaks to the Reel Description.

We tried to use \n as well as some html tags like <p> but nothing works. It's like after publication, Instagram automatically deletes the spaces and reduces them to one space.

I know it's possible because some scheduling SAAS like Later can schedule Reels with linebreaks in the description.

I'm trying to find someone who solved the problem already. What should I try next? How to format the json?

Thanks, T.

I am able to create new business manager using graph api exploror by using below api

POST https://graph.facebook.com/v20.0/{user-id}/businesses {"name":"","vertical":""} 

I am trying to do same by using system-user-access-token which has business_management permission still i always end-up with An unknown error has occurred

{     "error": {         "message": "An unknown error has occurred.",         "type": "OAuthException",         "code": 1,         "fbtrace_id": "AJLLEHScJ2XZs2Zfc6LSiOP"     } } 

Is there any way to create business manager using system-user access-token

I am trying to figure out how to approve an Instagram app which use instagram_basic and instagram_manage_messages.

I have created an app that offers to my customers a system to order and choose a Pick & Collect solution in my shops.

The app is working well in development mode but I keep getting rejection by Facebook Review team and I can't figure out why.

For instagram_basic, I have added this video: https://youtu.be/3kTJw-xegsY

And for instagram_manage_messages, this one: https://youtu.be/jvzUNG4q9qU

Any help would be greatly appreciated!

I am getting the following error from the below code and I can't seem to work out what exactly i am not doing right, I feel as though I am specifying the correct account IDs but it isn't being accepted.

import hashlib import hmac import sys sys.path.append('./.venv/lib/python3.12/site-packages') # Replace this with the place you installed facebookads using pip sys.path.append('./.venv/lib/python3.12/site-packages/facebook_business-3.0.0-py2.7.egg-info') # same as above from facebook_business.api import FacebookAdsApi from facebook_business.adobjects.adaccount import AdAccount my_app_id = '995427558947840' my_app_secret = '04765ed9281612e2aa8723935a7e4ad2' my_access_token = 'EAAVuWk8drdWkBOw5gCusNtZCxbwej5AIQdBsVhug4SZCneZCU95y2LgIyd5ulE8JC2KMfoyVYdxF5CZBrvyZCp6vYJzhApftZBp9Y4Lt0TtkRcOsTJmOE2AZBGbrbJcpn6ZAqXzyqTloLqrFSohRb6gBTz5KVI1m0VU7qLTCuZBMvNlTZBw5CiwbBQZBLGYh98rht0q3N7gPdJgunZCrVZAjWFeZCsYc2ZCvRCAZD' app_secretproof = hmac.new(bytes(my_access_token,'utf-8'),bytes(my_app_secret,'utf-8'),hashlib.sha256 ).hexdigest() FacebookAdsApi.init(my_app_id, my_app_secret, my_access_token, app_secretproof) account = AdAccount('act_229199089180260') campaigns = account.get_campaigns() print(campaigns) 

Account ID provided in FacebookAdsApi.set_default_account_id expects a string that begins with 'act_'

I expect this code to bring me back all the campaigns in my given Facebook Ad account

We have received an email about Meta ad account

1 Event parameters blocked

Hi ,

Some event parameters in your data, Ad account’s Pixel(<pixel_id>) may contain information that goes against our Meta Business Tool Terms. The parameters are blocked. Review and fix the parameters. By addressing issues in the data you send us, you’re helping protect your users and your business.

Further issues can result in data restrictions and limited functionality in certain ad features such as custom conversions and custom audiences.
Blocked parameters – by Meta
These parameters must be removed from your integration setup.
subject
Learn more Troubleshoot Meta Business Tools data policy violations Why this happened It looks like data in your event parameters may go against the Sharing Business Tool Data with Meta policy in our terms.
Examples of information you should not send to us include:

Health, financial or other categories of sensitive topics about people Information from or about children under the age of 13 Customer information parameters that are not hashed as required by Meta Identifiers such as social security numbers and credit card numbers 

Thanks,

Meta Business Team”

Do you have any suggestion on why this happened.

I tried to get solution to debug and resolve event parameters blocked issue.