Re: auto posting from my site for blogger php

Ramin Chavoshi <[email protected]>
Newsgroups gmane.comp.web.blogger.api
Message-ID <[email protected]>
i have two problem
inside  
$authToken = *'OAuth 2.0 token here*';
what do i  insert?
clinet id or cleint secret or apikey
if api key which one server api ey or clienet api key


already i receive below message after execute php file
*SSL certificate problem: unable to get local issuer certificate*





On Friday, May 15, 2015 at 12:15:09 AM UTC+2, Eduardo Amorim Oliveira wrote:
>
> after demand tests can not you post on my blog I get error and the posting 
> does not work alquem could give me a help please thank you
>
> <?php
> // Your ID and token
> $blogID = '6034518501306165301';
> $authToken = 'OAuth 2.0 token here';
>
> // The data to send to the API
> $postData = array(
>     'kind' => 'blogger#post',
>     'blog' => array('id' => $blogID),
>     'title' => 'teste',
>     'content' => 'With <b>exciting</b> content...'
> );
>
> // Setup cURL
> $ch = curl_init('
> https://www.googleapis.com/blogger/v3/blogs/'.$blogID.'/posts/');
> curl_setopt_array($ch, array(
>     CURLOPT_POST => TRUE,
>     CURLOPT_RETURNTRANSFER => TRUE,
>     CURLOPT_HTTPHEADER => array(
>         'Authorization: '.$authToken,
>         'Content-Type: application/json'
>     ),
>     CURLOPT_POSTFIELDS => json_encode($postData)
> ));
>
> // Send the request
> $response = curl_exec($ch);
>
> // Check for errors
> if($response === FALSE){
>     die(curl_error($ch));
> }
>
> // Decode the response
> $responseData = json_decode($response, TRUE);
>
> // Print the date from the response
> echo $responseData['published'];
> ?>
>

-- 
You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/bloggerdev.
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.