Is It possible like https://plus.google.com/s2/photos/profile/?sz= to get user name by user_id? Without oAuth, without any code, only URL. I'm trying to use in Spreadseet in formula =HYPERLINK() Thanks!
-
like here http://stackoverflow.com/questions/9128700/getting-google-profile-picture-url-with-user-id – contributorpw Nov 01 '13 at 06:12
-
I assume you already have the user ID? What spreadsheet app are you using? – BrettJ Nov 01 '13 at 14:26
-
Yes, see example http://goo.gl/gncnZR – contributorpw Nov 03 '13 at 17:47
-
1Are you opposed to using Google App Script? – BrettJ Nov 04 '13 at 15:21
-
BrettJ, oh, I'm not! I can use a Goole Apps Script. It's best idea. But I thought a simple url is available ;-) – contributorpw Nov 04 '13 at 17:51
2 Answers
You cannot read a value, such as a name, from a URL without some sort of helper method like a Google App Script. The built in spreadsheet functions (like ImportHtml) aren't going to provide you that capability. Of course every user has a a URL: https://plus.google.com/114173154718145483119 for example, but you still would need to parse that page for the title. And if you're going to hit a URL, you should do it the right way and just use the API within App Script using people.get, which does allow for anonymous access if you have specific user IDs to look up so that you would not need to set up OAuth authentication.

- 6,801
- 1
- 23
- 26
It sounds like you only have the profile image links? These do not follow any pattern than I am aware of that you can use to determine who the owner is - it does not look like you could easily link the content to a specific user. You could search for pages containing the path but this would be error-prone.
However, if you have the path to a user's Google+ account, then you can extract their profile id and can then perform an API call to plus/people/get
The format of the path to a user's Google+ profile is as follows:
https://plus.google.com/[profileid]

- 8,621
- 29
- 30