How to get user photo using LightOpenID php class for google and yahoo - lightopenid

I am using LightOpenID php class ie openid.php class. I want to fetch the user photo. But it does not return information about user's photo. Please help me I have to fetch user account photo.
Thanks,

OpenID providers don't have to return any information you've requested.
Here's the list of attributes Google will return if you ask for them:
country
email
first name
language
last name
You can find it at google's openid endpoint documentation.
Google won't return any other attributes, regardless of whether you ask for them or not. Since the user photo isn't on the list, you can't get it.
As for yahoo, a post on developer.yahoo.com says that if you request media/image/default it will return the profile picture. I don't know whether that information is up to date though. If you still can't get the profile picture by requesting that, then most likely yahoo doesn't support it anymore (or you don't have a profile picture).

Related

Get drive files stats (views/openings) | Google Drive API

I've been searching the docs but I can't find anything.
The goal is to retrieve different stats from our files. Actually, we can retrieve almost everything we need, except for the document openings and document openings per user.
So here is the question: How can I retrieve document views of a drive document (a G Sheet to be more precise) ? Can I segment it by user ?
Thank you
I understand that your goals are the following one:
You want to retrieve document views
Of a particular document (and you know it's id)
Associated to a specific user
Please correct me if I get it wrong. If those are your goals, then you can use the Admin SDK as pointed out by Rubén in the comments. Now I am going to detail how you can make such a request easily.
You could use the method activities.list() to get a list with what you want. You only have to populate these four parameters:
Parameter
Value
Description
userKey
The user's email
Determine the user
applicationName
drive
Identifies the Google service
eventName
view
Designate the type of activity
filters
doc_id=={MY DOCUMENT ID HERE}
Filters by the document
That configuration will provide you with your desired data. Leave a comment below if you need help creating that request in your own environment.

Get User's first and last name via Google API

Currently I am developing a Chrome-GMAIL extension which requires me to get the logged in user's first and last names. For experimentation, I have used the following goggle API (userinfo) and have successfully obtained the names I wanted:
https://www.googleapis.com/auth/userinfo.profile
However, using the userinfo APIs will cause a change in the OAuth2 scopes in my manifest. This change will in turn cause a permission-prompt to my existing users (if a domain wide delegation is not setup in place). Point being the idea of having more prompts in front of my user, or additional oauth scope is not really something I desire.
Currently our extensions use the following OAuth scopes and API :
Chrome's Identity API
Chrome's Storage API
GMAIL.modify
GMAIL.send
My question is, is it possible to get the first and last names using an API that is defined/allowed/provided for by any of the above scopes/permissions I listed? or is userinfo the only way to go?
Thank you very much.
Profile data like first name and last name is private data. You are corect that some Google apis give you access to some data that would normally require an extra scope. For email normally you would need to to request the email scope to get this back however the Gmail api does have an endpoint getprofile which will return the current users email address without you requesting the email scope.
However i am not aware of any apis that will give you access to the users first and last name without you requesting the profile or user.profile scope.
If you do decide to add the scope, I do recommend going though the people api rather then the userinfo endpoint as the data returned by the user info endpoint is not guaranteed to always return the name.

Instagram: Is it possible to get user's name, follower numbers, and search photos with #tag?

I once asked this question.
Is it possible to use Instagram API in order to make a user list according to the number of followers?
And I am not a programmer, just a salesman.
And it seems like we cannot make this influencer finding tool by using "official" Instagram API. So I have looked for other solutions and found a way to get data from Instagram by using other API and JSON.
Please refer to these links.
https://github.com/whizzzkid/instagram-reverse-proxy
How can I get a user's media from Instagram without authenticating as a user?
Obtaining Instagram Access Token
My goal is creating an influencer finding tool, so I need to find photos with #tag and make user list accordingly to the number of followers of the user.
My question is;
1 Is it possible to get data such as user name, follower numbers, photos with certain #tag? by using non-official API and JSON?
2 And suppose we made it, then Instagram will find out our products and ban our accounts or service? It seems they do not allow us to use non-official API.
I would appreciate it if you could teach me whether we can make it or not, in a way that you talk to the person who does not know much about JSON or so.
Thank you!
Using unofficial API is always risky, its against their terms and policy.
You can use official APIs to make get this info.
You first have to make hashtag API , which gives you posts with username (no follower count), then for each user, you have make another API call to get user info, this will give you follower counts, bio and other details.
The 2 APIs needed are below, you need public_content scope permission and have to get your app approved by instagram and go to live mode.
https://api.instagram.com/v1/tags/{tag-name}/media/recent?access_token=ACCESS-TOKEN
https://api.instagram.com/v1/users/{user-id}/?access_token=ACCESS-TOKEN

geteditors not returning emails the ui decides is a group

So you create a document in drive, then share it. You share it to someone inside google's network, the email address gets an icon of a single dude. But if you share it with someone outside of googles network, you get an icon of multiple dudes. At least you do when you share it with security set to anyone with the link can get in. Im not sure if this works in the other modes.
but anyways, you now write an app script that wants to send an email to everyone the file is shared with. so you use DocsList to get the file, then call the getEditors method to get the list of people that the file is shared with. The problem is it looks like that method only returns the email addresses with the icon of the single dude. How do I get the other email addresses?
If that can't happen, how do I tell Drive that the external email address I'm adding is in fact a person and not a group?
I think that happened because you shared to someone that do not have a google account.
In order to see the document with an identified ID they must have a google account (that do not mean a google email adress) You can create an account associated to your email adress here
for the second part of the question you can refer to that previous question here

Facebook photo name showing on website

How can I get the user's photo and name to show on my website and save them in MySQL?
This can be simply achieved by querying Graph API with id of user
http://graph.facebook.com/USER_ID?fields=name,picture
Results will contain name of the user and URL to his picture
you need to get permission from user that uses your application.
once you have user_photos permision you can do whatever you want.
you can find all permission in here: extended permission: https://developers.facebook.com/docs/authentication/permissions/#extended_perms
and look out here:
https://developers.facebook.com/docs/reference/api/photo/
Juicy is right that you can get that information. Turgut is not right about the authorisation as you can actually get that information for anyone if you know their Facebook Id. And therein lies the issue. If you are in a facebook app then facebook will post the user's id with the request for each page within the request object. But outside of facebook iframe apps you will need a way to query the users id. this can be done using the Facebook javascript api.
Here is some further reading:
http://developers.facebook.com/docs/reference/api/
http://developers.facebook.com/tools/explorer/?method=GET&path=735915914
http://developers.facebook.com/docs/authentication/canvas/
visiting users Facebook ID w/out authorization?