I am trying to retrieve gender and birthday from Google accounts. I am trying in Google Playground (https://developers.google.com/oauthplayground/) by doing the following:
I authorize all Google OAuth2 API V2 scopes (https://www.googleapis.com/auth/plus.login, https://www.googleapis.com/auth/plus.me, https://www.googleapis.com/auth/userinfo.email, https://www.googleapis.com/auth/userinfo.profile).
Then I generate the access token and finally I make a request to https://www.googleapis.com/userinfo/v2/me.
The information I get is: family_name, name, picture, locale, email, given_name, id and verified_email. I tried many things but I cannot get gender or birthday.
NOTE: The account I am using has both gender and birthday marked as public (checked in https://aboutme.google.com)
Related
I'm trying to get a PUBG player's details using the Players developer API.
I'm aware that both the operations of this Players API require the account ID of the respective player, whose account details are required.
However, I tried my best to find the account ID (starting with account. and having 32 alphanumeric characters), but all in vain.
In this aspect, I've two specific questions:
How can I find my PUBG account ID?
If I want to fetch other players' details via API, how do I get their account ID programmatically? Or should I need to ask for their account ID explicitly?
Use filter[playerNames]=myPlayerName as shown in the player docs
On succes, it wil return a object containing the account_id;
https://api.pubg.com/shards/steam/players?filter[playerNames]=myPlayerName
{
"data": [
{
"type": "player",
"id": "account.c0e511111111111893af",
...
Replace myPlayerName with the username you're looking for.
edit;
This Community Manager says that only - and _ are allowed in nicknames, url-escaping won't be necessary!
I'm trying to get all cards in a board assigned to a specific user, but the below returns all the cards in a board.
I did not find this solution anywhere; this is what I tried, and it returns cards assigned to all users:
https://api.trello.com/1/boards/${boardid}/cards?fields=name,shortLink&key=${applicationkey}&token=${userkey}
${boardid} = id of the board I want cards from
${applicationkey} = Trello Developer API Key
${userkey} = Trello User Token
Looks like a lot of people were able to do this, but there is no working documentation on this one.
I was able to accomplish this (get all cards assigned to me), by using the Trello search API.
Query URL (Cards assigned to a member):
https://api.trello.com/1/search?query=label:green%20member:${memberid}%20board:${boardname}%20sort:edited&card_fields=name,shortLink&cards_limit=100&key=${applicationkey}&token=${userkey}
Query Pattern (regexp to read cards):
"name":"({Description}.+?)","shortLink":"({Id}.+?)"
Parameters used:
${applicationkey} = Developer API Key
${userkey} = User Token
${boardname} = Actual name of the board in Trello
${memberid} = member id of the Trello user
Get Developer API key and User Token: Click here
Get member id from here:
https://api.trello.com/1/search?query=is:open%20board:${boardname}%20sort:edited&card_fields=name,shortLink,member&cards_limit=100&key=APIKey&token=UserToken
When user is log in with instagram api, with :
https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=code
He than gets an access token to use ,and no data returned on the user .
Than , if you want to get your user id , or the user name , there is no way to do that ,
You have this :
https://api.instagram.com/v1/users/1574083/?access_token=ACCESS-TOKEN
But this will give you the user name -by his id . I DONT HAVE HIS ID, OR HIS NAME.
I just couldn't find any way to get the user details when log in , or after it .
Not mention anywhere in their API , and its a shame for a company that big .
https://api.instagram.com/v1/users/self?access_token=
I have a site where user A can book a lesson with a teacher, I then want to have an email sent to the teachers saying user A wants to book a lesson with you etc.
I have postal up and running sending emails without issue,
however, I don't know how to access the email address of the teacher to send the email.
The email address is saved as part of the built in UserProfile table. I have the teacher's UserId (as it's stored in a separate teacher table).
So is there a way to access the teachers email ,searching by UserId?
In any other table I would use t in db.Teacher.find(id) but this doesn't work within the Account Controller.
This was built using the default MVC4 internet website template using the built in simple membership. Let me know if more information is needed.
I've added the following to the AccountController;
private UsersContext db = new UsersContext();
public ActionResult EmailNotification(int id)
{
var user = from l in db.UserProfiles.Find(id)
select l;
}
db.UserProfiles.Find(id) however gives the following error;
Could not find an implementation of the query pattern for source type 'LessonUp.Models.UserProfile'. 'Select' not found.
Which I assume is a result of it not being created through the entity framework?
I think your query needs to be something like the following:
var result = from q in context.UserProfiles
where q.UserId == id
select q;
I am trying to retrieve user email via facebook after user authentication on my website.
I ran the query below, but the email and birthday fields are empty ; and they are very vital for registration on my website.
#*** run fql ***
$fql = "select uid, first_name, last_name, name, sex, email, current_location, website, interests, birthday, pic_big from user where uid=me()";
$param = array('method' => 'fql.query', 'query' => $fql, 'callback' => '');
$user = $facebook->api($param);print_r($user);
What do i do please
To access fields like email and birthday you need to request extra permissions during authorization. Full list of permissions is available here.