Using Google Api in Google Plus I am getting the public posts performed by that particular user(Logged in by whom) only as follows::
private Person profile = null;
profile = plus.people().get("me").execute();
Plus.Activities.List list = plus.activities().list(id,"public");
((com.google.api.services.plus.Plus.Activities.List) list).setMaxResults(Long.parseLong("50"));
ActivityFeed feed = ((com.google.api.services.plus.Plus.Activities.List) list).execute();
How do I get all the posts performed by the user as well as by the other users(friends) as shown in the Google plus user profile?
Currently, the Google+ APIs only provide access to public posts by a user. Also, Google+ does not currently offer a method that would allow you to list a specific user's friends.
Related
I've created an application in sandbox on Instagram and I just noticed that despite having the users be a part of my sandbox environment and also following them (and being followed) on Instagram, I am UNABLE to retrieve the media of ONLY those users who've set their account as Private Account. I am able to retrieve media of all the users who've not set any privacy on their account regardless of whether they follow me/I follow them or not.
Now, despite me following and being followed by some users, and also including them as sandbox users of my app, why am I unable to retrieve their data?
API Used: https://api.instagram.com/v1/users/{user-id}/media/recent/?access_token=ACCESS-TOKEN
Link: https://www.instagram.com/developer/endpoints/users/
Instagram API no longer allows retrieving private profiles even if the user has been approved by the private user. This change went into effect with the June 1st 2016 API changes.
private profile can be retrieved using API using the private profile's access_token, but not any other user's access_token (even if approved)
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.
is there a way to get a list (ideally XML or Json) of what pictures a specific user likes on Instagram?
I had a look at the Instagram APIs but there's nothing like this. This would be have the same informations I can see in the News => Following menu but not limited to few hours.
There is no public API for accessing other user's likes, you can only get logged-in user's likes using this endpoint: http://instagram.com/developer/endpoints/likes/
I am attempting to pull Google+ activity data for a public page via the API, yet it returns zero items despite there being many public posts on the profile. Any idea what might be wrong?
Profile Link:
https://plus.google.com/107276257619752352564/posts
API Explorer Link:
https://developers.google.com/apis-explorer/#p/plus/v1/plus.activities.list?userId=114637566932717330174&collection=public&_h=2&
The profile user ID that you provided (107276257619752352564) doesn't match the one you're using in the explorer (114637566932717330174). Executing it with the profile user ID and making sure you've authorized the request appears to return results:
https://developers.google.com/apis-explorer/#p/plus/v1/plus.activities.list?userId=107276257619752352564&collection=public&_h=2&
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.