Skip to content

Conversation

@mbvb1223
Copy link
Contributor

@mbvb1223 mbvb1223 commented Aug 11, 2025

Issue:
If my string have a single quote, I can not use the CURL request log in Postman.
So we need to use escapeshellarg to add single quotes around a string and quotes/escapes any existing single quotes. Then we can use it in Postman

OLD CODE
image
curl -F 'block_display_for_non_targeted_viewer=0' -F 'context_card={"title":"Walkthrough Videos Are The Best Way To Sell Your Property","content":["Enhance your listings and give them greater social presence."],"style":"PARAGRAPH_STYLE"}' -F 'follow_up_action_url=https://www.xxx.co.za/' -F 'is_optimized_for_quality=1' -F 'locale=EN_GB' -F 'name=CCT Capture Media Video 01/10 Company Q (xxx) 10-202411 hello321xin chao abc xyz' -F 'question_page_custom_headline=Please complete the short form below so we can contact you to to discuss your specific walkthrough video needs.' -F 'questions=[{"key":"which_real_estate_company_do_you_currently_work_for?","label":"Which real estate company do you currently work for?","type":"CUSTOM"},{"key":"full_name","type":"FULL_NAME"},{"key":"email","type":"EMAIL"},{"key":"phone_number","type":"PHONE"},{"key":"province","type":"PROVINCE"}]' -F 'thank_you_page={"title":"Thanks, our team will be in touch.","body":"We\'ll contact you to to discuss your specific walkthrough video needs.","button_text":"View Website","enable_messenger":false,"button_type":"VIEW_WEBSITE","website_url":"https:\/\/www.xxx.co.za\/"}' -F 'allow_organic_lead_retrieval=1' -F 'privacy_policy={"url":"https:\/\/www.xxx.co.za\/privacy\/","link_text":"Privacy Policy"}' -F 'fields=id,page_id,name,questions' -F 'access_token=xxx' -F 'appsecret_proof=xxx' https://graph.facebook.com/v21.0/xxx/leadgen_forms [] []

NEW CODE
image

curl -F 'block_display_for_non_targeted_viewer=0' -F 'context_card={"title":"Walkthrough Videos Are The Best Way To Sell Your Property","content":["Enhance your listings and give them greater social presence."],"style":"PARAGRAPH_STYLE"}' -F 'follow_up_action_url=https://www.capturevideos.co.za/' -F 'is_optimized_for_quality=1' -F 'locale=EN_GB' -F 'name=CCT Capture Media Video 01/10 Company Q (RUA230500013ST) 10-202411 hello123xin chao abc xyz' -F 'question_page_custom_headline=Please complete the short form below so we can contact you to to discuss your specific walkthrough video needs.' -F 'questions=[{"key":"which_real_estate_company_do_you_currently_work_for?","label":"Which real estate company do you currently work for?","type":"CUSTOM"},{"key":"full_name","type":"FULL_NAME"},{"key":"email","type":"EMAIL"},{"key":"phone_number","type":"PHONE"},{"key":"province","type":"PROVINCE"}]' -F 'thank_you_page={"title":"Thanks, our team will be in touch.","body":"We'\''ll contact you to to discuss your specific walkthrough video needs.","button_text":"View Website","enable_messenger":false,"button_type":"VIEW_WEBSITE","website_url":"https:\/\/www.capturevideos.co.za\/"}' -F 'allow_organic_lead_retrieval=1' -F 'privacy_policy={"url":"https:\/\/www.capturevideos.co.za\/privacy\/","link_text":"Privacy Policy"}' -F 'fields=id,page_id,name,questions' -F 'access_token=xxx' -F 'appsecret_proof=xxx' https://graph.facebook.com/v21.0/595010557337230/leadgen_forms [] []
................
image

@meta-cla meta-cla bot added the CLA Signed label Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant