Is there a way to get the profile picture for a google+ account by using an URL ?
I know that we can get the photo by doing something like: https://plus.google.com/s2/photos/profile/1234567890?sz=200 and I need something similar to get the profile cover photo.
It depends on the URL you have, if you have the user's Google+ ID, you can then retrieve their profile, which contains a link to their profile. An example:
Api Explorer Demo of Retrieving a Cover Photo
Set the fields value to cover/coverPhoto/url if it's not getting added automatically.
There is not a link to access profile photos through the Google+ API. The best way to do this would be to make a GET request to the people.get API endpoint, as follows:
GET https://www.googleapis.com/plus/v1/people/{userId}
That will return a Person resource, which will contain the user's profile image under the id image.
Related
The Instagram Basic Display API "allows you to get a user's profile" though is there a way to retrieve the Full Name of the user?
https://developers.facebook.com/docs/instagram-basic-display-api/reference/user
The link above shows that you can return the username but cannot get anything meaningful such as their Name, website or Bio - though you are able to get all of their media.
I believe it is possible with the Graph API (which is for professional accounts) but is there a way to do so with the Basic Display API?
The easiest way would be to send a GET request to https://instagram.com/{username}/?__a=1. You'll find what you need inside ['graphql']['user']
I am new to this Instagram API, and I read their doc about endpoints, this is the endpoint that I am using:
/v1/tags/{tag-name}/media/recent?access_token=ACCESS-TOKEN
It is fetching the images, but, only on my accounts photos. I want is, I will give an tag-name, and it wll display all, not just the photos on my account, but all the photos in Instagram too.
I know has been a long time, but just for the record.
Since you need the public_scope permission for this (the permission that gives you access to all public data on instagram, and not only your account) you need your app to be reviewed and approved by Instagram. However, if you're using the API for a one-site personal project, Instagram will not approve it.
Here's from Instagram's docs:
1: Which use case best describes your Instagram integration?
R: I want to display hashtag content and public content on my website.
A: This use case is not supported. We do not approve the
public_content permission for one-off projects such as displaying
hashtag based content on your website. As alternative solution, you
can show your own Instagram content, or find a company that offers
this type of service (content discover, moderation, and display).
You can find more information in the Permission Review documentation.
Your client is in Sandbox Mode and can only search for tags of photos posted by invited users. You have to login into https://www.instagram.com/developer, edit your client and click on the "GO LIVE" button.
If the "GO LIVE" button is disabled, you have get your app reviewed by Instagram first: Click on the Permissions tab and submit for review. (Company Name, Contact Email and Privacy Policy URL are required to start a submission.) Once approved, u will be able to click Go Live.
By hashtag you mean tags.
It works for me. Despite I'm using python client, it should work well when you're developing your own client. Look:
from instagram.client import InstagramAPI
api =InstagramAPI(client_secret=settings.CLIENT_SECRET,
access_token=settings.ACCESS_TOKEN)
result = api.tag_recent_media(tag_name='castle')
media = result[0]
for m in media:
print (m.images)
print (m.user)
print (m.tags)
You can try it and it is working for me.
/v1/tags/{tag-name}/media/recent?client_id={YOUR_CLIENT_ID}
My client id is created before "permission review", it is working now and I am trying to submit permission review to Instagram now, hope it will pass.
In my app I want to show the Google+ profile picture for a user.
The only function, I found, in the API to get the profile picture needs a userId.
However, I only have their email adress and not their Google+ userID.
Moreover the person, whose image I want to get, should not be forced to log in and authorize my app, as this person is mostly not identical to the user of the app.
So I think I need to get their userId by email. I read through the Google+ API documentation but can't find a way to do this, but I can't believe that this is not possible.
So my question is:
How can I get the Google+ userID with only an email address?
Is there maybe an other Google API to get a profile picture?
There is an API provided by https://www.avatarapi.com/ which returns the user's name and profile pic from an email address based on Google's public info.
It can be called via SOAP or HTTP at this API endpoint:
https://www.avatarapi.com/avatar.asmx
One of the benefits of this API is that it does not require the user to be authenticated with Google via OAUTH, so this could be exactly what you are looking for.
You can't do this using just their email address, however, if they paste their Google+ url, you could parse the id from the URL string and then get their profile image (and cover image!) using the public data API. The url: https://plus.google.com/me will bring you to their profile.
I highly doubt this is possible. Any kind of querying against the Google Plus API requires OAUTH. What's more, I'm not aware of way to query for a user ID by email address in the first place.
This thread would seem to confirm that this is currently not possible.
You can use the people.search API to search by email address and without requesting the user to authenticate. However, that will only search the public profile fields, which email is not a public field by default.
The only API methods that require OAuth are those that access private data. For public data, you can use the more simple API key method.
To reliably achieve what you are describing, you'll want to use Oauth and the plus.me scope to get the information that you want. This does require authorizing your app however.
I am trying to get just the top rectangle (https://twitter.com/cnnbrk see this page to see what I am talking about) from twitter accounts using the twitter api and placing them on my site. I want users to be able to press follow to follow the user as well. Anyone know a way to do this? Thanks!
That's quite easy. Retrieve the user with the corresponding Twitter API endpoint, i.e. GET users/show (https://dev.twitter.com/docs/api/1/get/users/show). Then, do your own rectangle to display the information provided by Twitter.
I already know how to retrieve the blog data via the email and password of a user, but looking through the returned feed, I don't see the user's profile photo.
Is there any way to retrieve this?
Thanks!
Simple answer : No.
But probably you could do something with this URL, it will give you the profile picture of someone's Google Plus account
https://plus.google.com/s2/photos/profile/{user_id}