Implementing tripadvisor traveller rating - b2b

my goal is to show TripAdvisor score rank inside my app alongside other ranking system. Keep in mind that my application is a B2B app, not B2C.
What i can not understand even after reading the developer documentation is what kind of API should i eventually ask for.
The Content API is only for B2C purposes...but, apparently, it is the only one that send me in response the actual TripAdvisor rating (the only thing i actually want from all TripAdvisor information).
Has anyone implemented TripAdvisor in an OTA (online travel agency) application and can guide me on which APIs to request?
Thank you in advice

I have not implemented TripAdvisor ratings in a B2B system, but helped on a B2C project that used Tripadvisor data.
Your findings regarding Content API is correct, this is the only API where you find ratings.
Rating is TripAdvisor "selling point", so this data protected and can only be used by following their presentation terms. Check out how here: https://developer-tripadvisor.com/content-api/display-requirements/
You have 6 months implementation time and have to get Tripadvisor approval, or they cancel your API key. By using their API you commit not to store any data retrieved from their API.
Quick guide to use their API: https://developer-tripadvisor.com/content-api/documentation/
Call the locator_mapper to get possible location_id(s)
http://api.tripadvisor.com/api/partner/2.0/location_mapper/42.344978,-71.119030?key=[YOUR_KEY_HERE]-mapper&category=hotels&q=Beacon%20Townhouse%20Inn%201023
It returns a JSON with possible locations,
{
"data": [
{
"location_id": "89575",
Then call location with the id to get ratings: http://api.tripadvisor.com/api/partner/2.0/location/89575?key=[YOUR_KEY_HERE]
"review_rating_count": {
"1": "18",
"2": "22",
"3": "63",
"4": "269",
"5": "1408"
},
Use this data, together with the presentation and links back to tripadvisor to comply with their license.

Related

Facebook Graph API not returning posts likes

I am trying to retrieve the number of likes for posts in a Facebook page. For instance, I am calling the following endpoint from Graph API explorer
nba?fields=posts{message, likes}
to retrieve posts from NBA page. But I only managed to retrieve message and id but not the likes. Is it because of new privacy policy?
`
{
"posts": {
"data": [
{
"message": "๐Ÿ˜ƒ๐Ÿ˜€๐Ÿ˜ฎ Does ANYBODY get better bench reactions than Klay Thompson??
๐Ÿ‘€: Golden State Warriors x Cleveland Cavaliers Game 3
๐Ÿ“บ: 9 pm/et Wednesday, #NBAonABC",
"id": "8245623462_10156593269718463"
},
{
"message": "๐Ÿ“ธ x #NBAFinals Game 2",
"id": "8245623462_10156593260853463"
},
{
"message": "Game 2 in #PhantomCam! ๐Ÿ‘€ the BEST of Stephen Curry, LeBron James, & more slowed all the way down.
NBAFinals presented by YouTube TV",
"id": "8245623462_10156592692223463"
},
{
"message": "George Hill added 15 PTS, 3 AST for the Cleveland Cavaliers in game 2 at Oracle Arena. #NBAFinals presented by YouTube TV",
"id": "8245623462_10156590505838463"
},
{
"message": "๐Ÿ—ฃ Stephen Curry somehow beat the shot clock with this WILD 3-pointer! Hear how it sounded around the world #GlobalGame ๐ŸŒŽ๐Ÿ€
`
https://developers.facebook.com/docs/graph-api/reference/v2.12/object/reactions
Likes are call "reactions" now ,(
thumb and , emoji reactions)
But I only managed to retrieve message and id but not the likes. Is it because of new privacy policy?
Yes. You will need admin access (page access token) now to get individual likes.
If you only want the number of likes though, you can ask for the summary field:
nba?fields=posts{message,likes.summary(1)}
And be aware, you will still need to get your app reviewed for Page Public Content Access, otherwise you wonโ€™t be able to get any info about pages you do not have admin access to. It works using above example link when using the Graph API Explorer app id - but as soon as you switch to one of your own, you will get an error saying you need PPCA, if the app in question isnโ€™t already approved for that.
Yes it is, more information than public available (by example the likes, now just called reactions) options will be closed soon.

Get demographic info from audience insight group from Facebook marketing API

I'm trying to get demographic audience data from the Facebook Marketing API.
If I do this search I only get audience size:-
6003024075156?fields=audience_size,description,name,topic,disambiguation_category
which returns
{
"audience_size": 2824330,
"description": null,
"name": "Air New Zealand",
"topic": "Business and industry",
"disambiguation_category": "Airline Company",
"id": "6003024075156"
}
In the documentation it suggests I can get other info as seen in the main audience insights panel in Business Manager
https://developers.facebook.com/docs/graph-api/reference/audience-insights-query/
I'm particularly interested in knowing how to construct the query to return the demographic info of the audience
https://developers.facebook.com/docs/graph-api/reference/audience-insights-age-gender/
Field Description
age_by_gender
list<AudienceInsightsAgeGender>
Demographic information by gender
I think what you want should be here:
https://developers.facebook.com/docs/marketing-api/audiences-api/audience-insights-api/v2.8
However, the lock icon beside it suggests to me that no such API exists. This is probably due to the fact that Facebook uses a third party (http://www.acxiom.com/) to acquire the aggregate demographic data.

Linkedin rest api to search people with name

Is there any LinkedIn Rest API available to search people with first and last name?
I am not able to find anything on their developer website.
I found this url from some other question: http://api.linkedin.com/v1/people-search:(people:(id))?first-name=bill&last-name=gates
But when I am trying to hit this url from APIGee REST console I am getting response as 403 permission denied. I am using oAuth with my LinkedIn account.
I am currently using free account on LinkedIn, is because of that.
Linked has closed its API some time ago. See a detailed announcement here.
You have to get Vetted API access from Linkedin in order to do People Search. For more information please look into this link
You can use LinkedIn Public Search Results Scraper API to achieve this.
Here is an example. Response for a profile found look like this:
{
"id": "jimmy-neutron-b914a91a5",
"name": "Jimmy Neutron",
"occupation": "Chief Executive Officer at NASA - National Aeronautics and Space Administration",
"location": "Houston, TX",
"last_job": "NASA - National Aeronautics and Space Administration",
"last_education": "Harvard University",
"thumbnail": "https://media-exp1.licdn.com/dms/image/C4D03AQE7YG6jwNNy2Q/profile-displayphoto-shrink_200_200/0/1584908070871?e=1620259200&v=beta&t=QJREJQLCsAIaDiQCOZJ6Nu6QoyUPWK8ytJAWU52icRU",
"link": "https://www.linkedin.com/in/jimmy-neutron-b914a91a5?trk=people-guest_people_search-card"
},
Now LinkedIn does not provide search people apis for the reason for data-stealing.
thanks

iTunes App Store API for Querying My Apps, Editing My Apps, and Uploading New Apps

Does Apple offer a web service API for querying iOS apps I sell under my account, editing these apps, and uploading new ones? If so, could someone provide a link?
The only thing I could find is the Application Loader tool that allows bulk creation operation for IAP via a file. Does this tool support bulk creation of apps? Does this tool support editing existing IAP?
https://itunesconnect.apple.com/docs/UsingApplicationLoader.pdf
Update
The App Store Connect API offers API access to a limited set of App Store connect features.
Old Answer
There is no web service API for performing private actions available only to you. You must login to iTunes Connect and do it there.
There is a web service for accessing publicly available information. It is documented here.
For example, for more info on the Yelp app, you could send this request:
https://itunes.apple.com/lookup?id=284910350
Which will return JSON like this:
{
"resultCount": 1,
"results": [
{
"kind": "software",
"features": [
"iosUniversal"
],
"supportedDevices": [
"all"
],
"isGameCenterEnabled": false,
"screenshotUrls": [
"http://a1283.phobos.apple.com/us/r1000/084/Purple/v4/d7/10/4e/d7104e7c-69b9-c30e-fb74-dc9ad4907e5d/mzl.qhnhnswp.png",
"http://a1583.phobos.apple.com/us/r1000/091/Purple/v4/f2/9e/1f/f29e1ff0-15ae-955b-9470-95e777e0d302/mzl.ehinvjli.png",
"http://a232.phobos.apple.com/us/r1000/080/Purple/v4/fa/be/87/fabe8765-de35-ae10-6eba-4b77dee9579c/mzl.ypncttex.png",
"http://a1190.phobos.apple.com/us/r1000/114/Purple2/v4/86/68/86/86688674-4540-b317-9e1f-fc2c8adede50/mzl.ekbdqwzg.png",
"http://a296.phobos.apple.com/us/r1000/115/Purple2/v4/b6/ca/e1/b6cae1d2-5754-d092-c2c3-09dce16a5b86/mzl.xroiibzd.png"
],
"ipadScreenshotUrls": [
"http://a1855.phobos.apple.com/us/r1000/069/Purple2/v4/27/53/59/27535982-a8ab-752b-1352-14376dbd52fa/mzl.pzkmvqsc.1024x1024-65.jpg",
"http://a1384.phobos.apple.com/us/r1000/120/Purple/v4/d8/61/72/d86172b0-c012-b520-aaea-0fe405af8220/mzl.ayvdvsyz.1024x1024-65.jpg",
"http://a1714.phobos.apple.com/us/r1000/107/Purple/v4/d4/e6/54/d4e65417-151e-c358-cf46-67034eb1c809/mzl.cqcnsrnw.1024x1024-65.jpg",
"http://a668.phobos.apple.com/us/r1000/115/Purple2/v4/9f/0f/0c/9f0f0c76-86cf-5af0-7d62-e57d05cdb7d9/mzl.gdkkhahb.1024x1024-65.jpg",
"http://a886.phobos.apple.com/us/r1000/080/Purple2/v4/4e/2c/e8/4e2ce8be-f69d-2fd9-b79a-e9a689dd1ad6/mzl.vjffwbxj.1024x1024-65.jpg"
],
"artworkUrl60": "http://a1154.phobos.apple.com/us/r1000/093/Purple2/v4/df/d2/d1/dfd2d173-7901-1c41-fcc3-ea953e698961/57.png",
"artworkUrl512": "http://a1157.phobos.apple.com/us/r1000/108/Purple/v4/db/b7/fb/dbb7fb10-29a7-4771-e781-38fffee81c85/mzl.atjqxuth.png",
"artistViewUrl": "https://itunes.apple.com/us/artist/yelp/id284910353?uo=4",
"artistId": 284910353,
"artistName": "Yelp",
"price": 0,
"version": "6.5.1",
"description": "Looking for a burrito joint open now? An Irish pub nearby? A gas station you can drive to before your tank hits empty? Yelp for your iPhone or iPad is here to help. Use us to search for places to eat, shop, drink, relax and play then read reviews from an active community of locals in the know. \n\nFEATURES:\nโ˜… Search for businesses near you \nโ˜… Tap quick links to find nearby bars, restaurants, cafes and more\nโ˜… Narrow your searches by 'hood, distance, price, and what's open now\nโ˜… Browse reviews to read what's great (and not so great) in your city\nโ˜… Find great Deals offered by your favorite local businesses on iPhone\nโ˜… Add tips, photos, and draft reviews for your favorite businesses\nโ˜… Check-in and share on Facebook and Twitter\nโ˜… Make reservations on OpenTable without leaving the Yelp app\nโ˜… Look up addresses and phone numbers for thousands of businesses, then call or map them from your iPhone or iPad\nโ˜… Yelp does augmented reality with Monocle. Overlay business information onto the world around you.",
"currency": "USD",
"genres": [
"Travel",
"Navigation"
],
"genreIds": [
"6003",
"6010"
],
"releaseDate": "2008-07-11T07:00:00Z",
"sellerName": "Yelp, Inc.",
"bundleId": "com.yelp.yelpiphone",
"trackId": 284910350,
"trackName": "Yelp",
"primaryGenreName": "Travel",
"primaryGenreId": 6003,
"releaseNotes": "New in 6.5.1:\nJust to show how much we love our Yelpers, we're knocking out two big feature requests with this release:\nโ˜† Apparently 300 characters per Tip wasn't enough for you to fully express yourself. We dig that. This release gives you 200 more.\nโ˜† From the \"More Reviews\" list on iPhone, pull down to expose a review search box. Now you can skip the other stuff and find out exactly what people think about the \"carne asada burrito\" at that new Mexican spot down the street.\n\nNew in 6.5:\nโ˜† We gave our iPad business page a whole lot of love. It's now more streamline and clear, with more emphasis on business photos. In addition, we're now showing Yelp Deals and our new \"Explore the Menu\" feature.\nโ˜† Yelp search just got more social: Now you can see which friends are checked in to businesses directly from your search results.\nโ˜† Getting to a restaurant just after closing is a major bummer. Now we'll indicate if a business will be closing soon or is just about to open.\nโ˜† We also got in a TON of bug fixes and enhancements: showing your review first in the reviews list, supporting updated reviews on iPad, swipe-able photos on the business page, and huge speed improvements on iPhone5!",
"formattedPrice": "Free",
"wrapperType": "software",
"trackCensoredName": "Yelp",
"languageCodesISO2A": [
"SV",
"TR",
"NB",
"DA",
"DE",
"EN",
"ES",
"FI",
"FR",
"IT",
"NL",
"PL"
],
"fileSizeBytes": "18176675",
"contentAdvisoryRating": "12+",
"averageUserRatingForCurrentVersion": 3.5,
"userRatingCountForCurrentVersion": 74,
"artworkUrl100": "http://a1157.phobos.apple.com/us/r1000/108/Purple/v4/db/b7/fb/dbb7fb10-29a7-4771-e781-38fffee81c85/mzl.atjqxuth.png",
"trackViewUrl": "https://itunes.apple.com/us/app/yelp/id284910350?mt=8&uo=4",
"trackContentRating": "12+",
"averageUserRating": 3.5,
"userRatingCount": 170887
}
]
}

Facebook ID from URL

Given a facebook url such as http://facebook.com/cnn, is there any way to get the ID of that page short of scraping it?
It is better (and legal) to do this with graph API. Just perform API request to https://graph.facebook.com/cnn and get id from the response.
Here is the response for cnn:
{
"id": "5550296508",
"name": "CNN",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs178.ash2/41813_5550296508_728_s.jpg",
"link": "http://www.facebook.com/cnn",
"category": "Company",
"website": "www.cnn.com\nwww.ireport.com\n",
"username": "cnn",
"company_overview": "TRIVIA FROM THE CNN TOUR...",
"products": "CNN US...",
"likes": 1689936
}
Facebook's own Graph API supports it. From the documentation:
The "ids" query parameter also accepts URLs. This is useful for
finding IDs of URLs in the Open Graph. For example:
https://graph.facebook.com/?ids=http://www.imdb.com/title/tt0117500/
As of Today(28th July 2015), There still exists an easy way to get page(or user's) id.
Browse to facebook page(or user) url. The syntax is https://www.facebook.com/[username or pagename]
Right click to view source and then search for string "pageID": in case of page. The numeric id next to searched string will be id.
In case of user, search for "uid":.
Been working with it today. So, for people who want to know how this works. Use this:
https://graph.facebook.com/<the_fb-address>?access_token=$accessToken
And remember: this is only for pages. Not user pages/friends' timelines etc.
Those will have to approve your Facebook App first before you can read their profiles.