I'm working on an app and I want to display a male symbol or female symbol for a list of GKPlayers whose photo's can't be returned from GameCenter. Is there a way to determine the gender of a GKPlayer?
Not directly, No. (Even with private API.)
However: If you can use private API, then it looks like Facebook user ids MIGHT be available for players that have opted in:
https://github.com/nst/iOS-Runtime-Headers/blob/master/Frameworks/GameKit.framework/GKPlayerInternal.h (and GKPlayer.h, same place)
You might then be able to fetch gender info from Facebook.
The usual warnings about private API apply, of course: fragile, Apple won't allow it in the store, etc etc. Also, be aware that correlating a GK Player with external identity info violates the Game Center Terms of Service.
Related
I am working on a React application with two user types: Buyer and Seller. A Seller can access some (not all) data from the user through a search bar using the user's email. So for example, if a buyer wants to know what interests the buyer to buy, and he has the user's email and did a search query it can show the user's interest if and only if the user made these data available to show if looked up.
Now, I have two user types, and one of the users Seller is getting access to info from the other Buyer. How to implement that the right way? And how to make sure the search is working properly. Any ideas? Thanks!
You can really only achieve this properly through a database, what you want to do is have a user table that contains all of the users connected to your app, then, one of the fields you would have for the user is AccountType, there, you would declare a 0 for a buyer or a 1 for a seller. For the search bar you would use a FlatList that contains the data you want to display, since your question is so broad I can't really provide you with examples, but if you read this you should be able to make what you want:
For the database (using MySql): https://dev.mysql.com/doc/refman/8.0/en/
For the FlatList and SearchBar: https://www.geeksforgeeks.org/how-to-add-searchbar-in-react-native/ - https://reactnative.dev/docs/flatlist
I am trying to show stores to the user, but that stores need to be dynamic and should come from the database according to the user's current location.
User at Location1
user: show nearby stores
assistant: I need your location, can I get that?
user: yes
assistant: you are at location1, these are the stores near you.
Store1, Store2, Store3 (Suggestion Chips)
suppose if tomorrow the user is at a different location and ask the same question then he should be able to see other stores.
User at Location2
user: show nearby stores
assistant: I need your location, can I get that?
user: yes
assistant: you are at location2, these are the stores near you.
Store4, Store5, Store6 (Suggestion Chips)
I want to show these stores dynamically according to the user's location, in the form of suggestion chips, or in the form of list response.
Are you using a webhook? That would be the standard way of doing anything dynamic.
This codelab shows how to use the Dialogflow inline editor for dynamic responses.
You can use standard JavaScript to implement your decision logic and return dynamic suggestion chips.
If you want to get the users location, you need to use Permissions, there are neat helpers for that as well.
If you have more information on what you have tried so far, we can help you with more specific resources.
Can I set Google Places API to do a fuzzy search? It seems Google map search (which use JavaScript) does that automatically, but it appears the REST API does not. I am frustrated by having to type in the accurate hotel name....any spelling errors bring up no result.
Try Text Search requests,
The Google Places API Text Search Service is a web service that returns information about a set of places based on a string — for example "pizza in New York" or "shoe stores near Ottawa" or "123 Main Street". The service responds with a list of places matching the text string and any location bias that has been set.
The service is especially useful for making ambiguous address queries in an automated system, and non-address components of the string may match businesses as well as addresses. Examples of ambiguous address queries are incomplete addresses, poorly formatted addresses, or a request that includes non-address components such as business names.
I am using Google Analytics Core Reporting API. I have a little confusion that I want to discuss.
First I want to get keyword which User has searched to reach on my site. I have used ga:keyword. I have also seen one other dimension which is ga:searchKeyword. Which one of these will give me desire result?
Second I want to get keyword type is it organic or paid? If I will use ga:medium then will it give me type of searched keyword?
BTY using following function to get results
private function getResults(&$analytics, $profileId,$data) {
$optParams = array(
'dimensions' => 'ga:visitCount,ga:browser,ga:fullReferrer,ga:keyword,ga:country,ga:campaign,ga:medium'
);
return $analytics->data_ga->get(
'ga:' . $profileId, $data['start_date'], $data['end_date'], 'ga:visits',$optParams);
}
Please guide me.
Best Regards,
ga:searchKeyword is only for keywords from your internal site search. ga:keyword and ga:medium will give the desired result.
According to the documentation, ga:keyword tracks:
When using manual campaign tracking, the value of the utm_term campaign tracking parameter. When using AdWords autotagging or if a visitor used organic search to reach your property, the keywords used by visitors to reach your property. Otherwise the value is (not set).
ga:medium can be used to tell organic search and paid clicks apart. It tracks:
The type of referrals to your property. When using manual campaign tracking, the value of the utm_medium campaign tracking parameter. When using AdWords autotagging, the value is ppc. If the user comes from a search engine detected by Google Analytics, the value is organic. If the referrer is not a search engine, the value is referral. If the visitor came directly to the property, and document.referrer is empty, the value is (none).
We are planning to use foursquare api to get venue in a particular city. I want data of all the food outlets in a particular city. I have managed to get the categories list but not sure how to get venues from that particular category in a particular city or area.
Please share some tutorials or document which i can check out.
One way of doing what you want will be using the Venues Platform for browsing according to a category ID.
Look at venue search API reference.
Example of using it:
I know that 4bf58dd8d48988d11f941735 is nightlife (just picked the first one I saw)
So I will call the API (the ll is someplace in New York):
https://api.foursquare.com/v2/venues/search?ll=40.7268,-73.9972&categoryId=4bf58dd8d48988d11f941735&limit=50&intent=browse&radius=1500&your ids/oauth
Or use the explorer to see results right away.
Important, read the search API and the parameters used here to alter behavior to your needs.
Another very important thing, the API parameters are case sensitive!! (so if they want categoryId, categoryid will not work :) )