dougekui1518 2011-05-24 17:30
浏览 58
已采纳

用于Facebook的cURL PHP代码

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

  • 写回答

1条回答 默认 最新

  • dongzhi6927 2011-05-24 17:36
    关注

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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 正弦信号发生器串并联电路电阻无法保持同步怎么办
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序