artdarek / oauth-4-laravel

OAuth Service Provider for Laravel 4
684 stars 217 forks source link

problem with creating new blogger post #113

Open okursan opened 9 years ago

okursan commented 9 years ago

Hi folks, I couldn't manage to handle how to open a new blog post with artdarek/oauth. I can login and get user data from google and also;

$googleService->request( 'https://www.googleapis.com/blogger/v3/blogs/BLOG-ID-IS-HERE/posts/', 'POST');

above code opens a blank post. But I couldn't open the post with desired title, description and labels etc. In blogger api documentation:

Adding a post

You can add a post for a blog by sending a POST request to the post collection URI with a post JSON body:

https://www.googleapis.com/blogger/v3/blogs/blogId/posts/

Request

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..." }

You must be authenticated to create a post. Response

If the request succeeds, the server responds with an HTTP 200 OK status code and the contents of the post...

I couldn't find an example using artdarek to post information (to blogger, to twitter, to facebook etc.)

Thanks.