Hi Graeme,
> curl -i -X DELETE
> "https://graph.facebook.com/{post-id}?access_token={access-token}"
...
> access_token = '...blah...'
> base_api = 'https://graph.facebook.com/'
> post_id = '742194719255364_1530633492430138'
>
> payload = {
> 'access_token': page_access_token,
> }
> response = requests.delete(base_api + post_id, params=payload)
> print(response)
>
> response is 400
The identifier used for the value for the key 'access_token' in the
payload dict, page_access_token, doesn't exist in the listing above.
The identifier access_token does. Could page_access_token also be
defined but to something else? Or perhaps we're not being given the
actual code used.
Why not keep it as simple, and hard-coded as possible to test?
response = requests.delete(
'https://graph.facebook.com/742194719255364_1530633492430138',
params={'access_token': '...secret...'}
)
print(response)
If you can get that to work, you know the problem is then in the local
Python code as it deviates from what works.
--
Cheers, Ralph.
--
Next meeting: Online, Jitsi, Tuesday, 2026-09-01 20:00
Check to whom you are replying
Meetings, mailing list, IRC, ... https://dorset.lug.org.uk
New thread, don't hijack: mailto:[email protected]