I am using curl easy library to make http delete requests to Facebook graph to delete a post. Code snippet is below:
url = "https://graph.facebook.com/#{id}?access_token=#{token}"
curl = Curl::Easy.new(url)
result = nil
retries = 2
while (!result || curl.response_code != 200) && retries >= 0
result = curl.http_delete
retries -= 1
end
return result
Facebook returns "not valid request" each time. I have verified access_token in facebook debugger. What am i missing here? Can someone please help?
You should add
/post
to yoururl
as per the reference: