'Blogger API v3.0 - Working with users (OAuth 2.0)
Please see this documentation link: https://developers.google.com/blogger/docs/3.0/using#WorkingWithUsers
So, I'm trying to 'get a user' by user ID. This is a blogger blog user. We are the owners of the blog and the site respectively, and all the blogger accounts are our staffs. Now I want to have an author profile page. So the question is how do I actually do this? Seeing as I definitely don't want to display some sort of authorisation screen just to get some author information? How do I achieve this does anybody know??
Many thanks in advance.
Solution 1:[1]
This question is extreamly broad. I will try to get you started but I think if you have any issues you should probably open additial questions.
First of let me start by saying blogger is a pain and this is not going to be easy. This is because in order to access blogger for your different users you are going to have to authenticate each one using Oauth2 and get a refresh token for each one. This is done with the webpage authentication pop up window. Let me stress this is the only way you can not use a service account with blogger. you can read more about Oauth2 in my tutorial here Google Developer Console Oauth2 credentials it explains how to set up the account on google developer console.
Second I recommend you go with the official google .net client library
PM> Install-Package Google.Apis.Blogger.v3
Once you have both of those its a simple matter of authenticating. The client library stores the information locally on your machine so you will have a refresh token. You could create your own implementation of idatastore and then store the refresh tokens as you need so you will be able to access them when needed you will then be able to access the user info for each of the different blogger accounts. Again they will all have to be authenticated one at a time.
I have a sample project with some code for Blogger on GitHub it might help you get started.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | DaImTo |