このリンクのガイドである curl を使用して Twitter 経由でログイン解析を実装しようとしています: https://parse.com/docs/rest.html#users-signup
curl -X POST \
-H "X-Parse-Application-Id: REMOVED" \
-H "X-Parse-REST-API-Key: REMOVED" \
-H "Content-Type: application/json" \
-d '{
"authData": {
"twitter": {
"id": "12345678",
"screen_name": "ParseIt",
"consumer_key": "REMOVED",
"consumer_secret": "REMOVED",
"auth_token": "REMOVED",
"auth_token_secret": "REMOVED"
}
}
}' \
https://api.parse.com/1/users
そして、これがPHPでの私の実装コードです:
$ci = curl_init();
$data = '{"authData":{"twitter":{"id":"REMOVED","screen_name":"cat",
"consumer_key":"REMOVED",
"consumer_secret":"REMOVED",
"auth_token":"REMOVED",
"auth_token_secret":"REMOVED"}}}';
$header = array("X-Parse-Application-Id: REMOVED",
"X-Parse-REST-API-Key: REMOVED",
"Content-Type: application/json"
);
curl_setopt ($ci, CURLOPT_HTTPHEADER, $header);
curl_setopt($ci,CURLOPT_POST,true);
curl_setopt($ci,CURLOPT_POSTFIELDS,$data);
curl_setopt($ci,CURLOPT_URL,'https://api.parse.com/1/users');
$response = curl_exec($ci);
var_dump($response);
curl_close($ci);
しかし、var_dump($response) の結果は false です。私のコードの何が問題なのかわかりません。どんな体でも私を助けることができますか?