I am working on github gist API to create new gists using php, gists are creating but not showing in the list.
getting "invalid-email-address" as output.
below is the code
$headers = array(
'User-Agent: PHP',
'X-OAuth-Scopes: repo, user, gist',
'X-Accepted-OAuth-Scopes: repo, user, gist'
);
$data_string = json_encode($data);
# Sending the data using cURL
$url = 'https://api.github.com/gists';
$ch = curl_init($url);
curl_setopt($your_resource, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_USERAGENT,$user);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);