I have a question regarding API:
GET https://people.googleapis.com/v1/{resourceName=people/*}
When the resourceName = people/account_id and the personFields is 'names' the API returns names only when the account_id has a Google+ account associated with it. For the account_id without associate Google+ account, no names are returned.
My application scopes are:
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/contacts
https://www.googleapis.com/auth/plus.login
Is this expected behaviour? Is it possible to get account name by account_id without Google+ account?
Thank you in advance.
This is expected behavior. In general when getting data on other users, you only get their public data. Non G+ users don't have a public profile and so their name is not public unless they have explicitly set their name to be public.
See https://developers.google.com/people/#a_merged_view_of_people_information for more details on what data you should get.
Related
eg from their site
{
"access_token": "access-sandbox-de3ce8ef-33f8-452c-a685-8671031fc0f6",
"item_id": "M5eVJqLnv3tbzdngLDp9FL5OlDNxlNhlE55op",
"request_id": "Aim3b"
}
My question is what is "item_id" and why it keeps changing on repeated requests. I understand that "access_token" to change on repeated requests.
This is what Plaid documentation says
"item_id - string
The item_id value of the Item associated with the returned access_token"
How what should I treat this Item_Id as? InstitutionID?
Is the item_id actually changing across multiple consecutive API requests, or only if you link an account multiple times? It is normal and correct for you to get different item_ids if you link the same bank account multiple times. Two linked accounts are considered different items even if they are actually based on the same user credentials at the same institution.
An item_id is an identifier associated with an item. It is less sensitive than an access token, because it cannot be used to access any data. So it is used as a safer way of referring to an item across the Plaid API than passing the access token around. For example, webhooks that give information about a change to an item will include an item_id to let you know which item the webhook is about.
The field "from" returns nothing in this query:
https://graph.facebook.com/v3.2/(page id)?fields=posts{comments{message,created_time,from}}&access_token=(page access token)
The other fields return what I expect.
I'm administrator of the page but I haven't submitted my app for review because according to this page I don't have too, or am I wrong?
From the page:
Does not require App Review.
Grants your app access to the default fields of the User object that
are a subset of a person's public profile:
id
first_name
last_name
middle_name
name
name_format
picture
short_name
Or is there anything else I could have done wrong?
Without authorization, you cannot get any user specific data anymore, no matter if you own the Page in question. You can only get data like the message or the link to facebook.com.
I'm using the Yammer REST API to fetch data about messages posted in our Yammer network.
I can get messages from any group by passing the group ID.
But I don't know the group ID for the All Company group.
How can I find the group ID for the All Company group?
Use https://www.yammer.com/api/v1/messages/general.json.
You can see the other built-in feed type endpoints such as my_feed and private here: http://developer.yammer.com/restapi/#rest-messages
Yammer API POST call with parameter group_id allows posting message to a group, but not to AllCompany.
Same POST call with parameter feed_id allows posting message to a group and to AllCompany group (feed).
Use feed_id instead of group_id and all as id.
first get all the groups
using this API
https://www.yammer.com/api/v1/groups.json
in that group array check out the group full name. and you can use id of that array item. that will be your group id.
Use https://www.yammer.com/api/v1/messages.json.
This will give All public messages in the user’s (whose access token is being used to make the API call henceforth referred to as current user) Yammer network. Corresponds to “All” conversations in the Yammer web interface.
also refer answer from by #mleroy in earlier message.
use "all" as feed id for All company group.
I know this post is a bit old but it might help someone.
On every group page of Yammer, there is a section called Access Options on the right had side.
Click on the link "Embed this group in your side". It will give you JS code for the group which will include Feed ID as well.
Using this api you can able access all messages
https://www.yammer.com/api/v1/messages.json
from the response json you can see the group id of all message groups.You can notice that 'group_created_id' is null for all company group.
I dont think that group id for all company is 'All',because that parameter is an integer,So just pass null.
Its a bit weird, but I found out that the group_created_id field is null when the message belongs to "All Company"
So you can use messages.json as mentioned before to get all public messages,
or if you want to search for messages by groups, you can get a list of groups ids and use :
https://www.yammer.com/api/v1/messages/in_group/{group-id}.json
and after that use messages.json, and go over the messages and search for those who has the field group_created_id set as null
Hope it will help someone someday :P
I had a similar requirement of embedding Yammer All company feed for which I needed the Feed ID and this worked for me-
feedType: "general",
feedId: "all"
Hope this helps!
Scenario: my app runs queries where the user id is used in many cases to filter what data the user can see. The user id is an integer. I don't want the user to be able to simply alter the query string and change the user ID parm to another # (and essentially assume another user's identity). Through our authentication process, each request to the server includes a security token in the header, which was returned to the client when they logged in. During the auth process, this token is stored on the server and is mapped to the user's user id.
What I would like to do is pull the token out of the header, do a lookup and get the user ID that is mapped to the token value (got that working), and then alter the query string to add the user ID.
So a request may come in as
http://localhost/api/app/customerlist
And after I get the user id, it may look like this
http://localhost/api/app/customerlist?$filter=userid%20eq%1234
And then continue on.
This is a simple scenario but illustrates my goal. I am not able to add surrogate keys to the database and use a GUID or some other value as my filter column. Pretty much stuck with the structure.
Thanks
On the server side you can add any filters directly to whatever IQueryable is returned. If you use the Authorize attribute you can also access the user data via the "User" variable.
[BreezeController]
[Authorize]
public class NorthwindIBModelController : ApiController {
[HttpGet]
public IQueryable<Customer> CustomerList() {
var userName = User.Identity.Name;
var filter = filter on customers;
var custs = ContextProvider.Context.Customers.Where({ some filter using userName});
}
}
Also see:
Passing username to Web Api methods in ASP.NET MVC 4
Take a look at the EntityQuery.withParameters method. With it from the client you can take any query and add your user id filter to it. Something like
myQuery = myQuery.withParameters( { userId: 1234});
myEntityManager.executeQuery(myQuery).then(...);
Or am I missing something.
How to search for people in Google Plus using email?
e.g. this query never returns anything:
https://www.googleapis.com/plus/v1/people?query=[email_address]#gmail.com&key=MY_KEY
I tried a db of a thousand emails at least,
Also I have an account with very strange name, when I search by name I get the result, but with email I don't , I tried to url encode the email but still it didn't work.
The email address must be set as a public field in the user's Google+ profile to be able to search and find that entry. The people.search method only searches public fields.