【发布时间】:2014-10-07 11:13:30
【问题描述】:
我使用 Facebook 的以下输出尝试了以下操作,因为这需要发布。
$ch = curl_init('https://graph.facebook.com/appUserId/notifications?access_token=*****&href=index.php&template=test');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch,CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$response = curl_exec($ch);
var_dump($response);
var_dump(json_decode($response));
然后从这里我得到以下信息,我可能做错了什么?
string '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en" lang="en" id="facebook">
<head>
<title>Facebook | Error</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta name="robots" content="noindex,nofollow" />
<style type="text/css">
html, body {
margin: '... (length=2131)
null
【问题讨论】:
标签: php facebook http facebook-graph-api curl