0

All,

Currently I have a Facebook page that gets updated every few minutes using the cURL command. The command is :

curl.exe -kF "access_token=XXX" -F "message=YYY" https://graph.facebook.com/<appID>/feed

How can I programmatically implement the -k and -F in PHP?

[edit-05/24 - 15:59EST]:

-k flag: Allow connections to SSL sites without certs (H)
-F: -F/--form Specify HTTP multipart POST data (H)

I am not sure if message and access_token should be passed as POST fields. Can anyone please guide me on this?

I am getting the error: {"error":{"type":"OAuthException","message":"(#803) Some of the aliases you requested do not exist: 1.8800586791358e 14" }}* Connection #0 to host graph.facebook.com left intact

3

1 Answer 1

2

You will need to use the function curl_setopt().
View the documentation of CURLOPT_SSL_VERIFYHOST and CURLOPT_POSTFIELDS.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for posting. Can you please help me out with the error above?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.