작성한 글을 구글 blogger에 글 보내기(등록하기) 질문 드립니다, 채택완료
그누보드에서 작성한 글을 구글 블로거(blogger)로 SNS공유하기 처럼 보내기 하려고 합니다.
Blogger API v3를 이용하여 작업을 하려고 하는데 쉽지가 않네요.
API Key 만들어
https://developers.google.com/apis-explorer 에서 온라인으로 테스트를 하면 글 등록이 잘 되는데
php로 만든 소스를 이용하면 전혀 글 등록이 되지 않는군요.
사용한 예제 소스는
http://gayanonline.blogspot.kr/2013/03/google-api-v3-with-php-using-blogger.html
Copy
Blogger API v3 document에는
https://developers.google.com/blogger/docs/3.0/using
Adding a post
https://www.googleapis.com/blogger/v3/blogs/blogId/posts/
Request
Copy
POST https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/
Authorization: /* OAuth 2.0 token here */
Content-Type: application/json
{
"kind": "blogger#post",
"blog": {
"id": "8070105920543249955"
},
"title": "A new post",
"content": "With exciting content..."
}
Response
Copy
{
"kind": "blogger#post",
"id": "6819100329896798058",
"blog": {
"id": "8070105920543249955"
},
"published": "2012-05-20T20:08:00-07:00",
"updated": "2012-05-20T20:08:35-07:00",
"url": "http://brettmorgan-test2.blogspot.com/2012/05/new-post.html",
"selfLink": "https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/6819100329896798058",
"title": "A new post",
"content": "With exciting content...",
"author": {
"id": "16258312240222542576",
"displayName": "Brett Morgan",
"url": "http://www.blogger.com/profile/16258312240222542576",
"image": {
"url": "https://resources.blogblog.com/img/b16-rounded.gif"
}
},
"replies": {
"totalItems": "0",
"selfLink": "https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/6819100329896798058/comments"
}
}
Blogger API를 이용하여 글 등록 성공 하신 분이나 참고가 될 수 있는 예제 있으시면
이에 대한 조언 부탁 드립니다.
감사합니다.
답변 1개
채택된 답변
+20 포인트
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인