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

name_masked
  • 9,544
  • 41
  • 118
  • 172
  • 1
    You may get more responses if you outline what they do exactly – Pekka May 24 '11 at 17:33
  • Possible duplicate of: http://stackoverflow.com/questions/356705/how-to-send-a-header-using-a-http-request-through-a-curl-call – Ortiga May 24 '11 at 17:33
  • 2
    here is how you use curl in php http://us.php.net/manual/en/book.curl.php – Ibu May 24 '11 at 17:34

1 Answers1

2

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

fvox
  • 1,077
  • 6
  • 8