How to integrate TripAdvisor with IOS APP? - ios

In my app i need to integrate it with TripAdvisor API.
i searched a lot about it, i found this in there website:
https://developer-tripadvisor.com/content-api/
it's actually un useful!.
I didn't find any example or demo for this integration!
Anyone knows how to integrate with TripAdvisor in IOS? Or have any example about it?
thanks

Well, just like most APIs, you first have to get your API key from TripAdvisor. So go to the Request API Access form and fill that out (You have to sign up for Trip Advisor first, or sign in with a Facebook or Google account). They will then contact you with your API key and info.
Now that you have the key, the more interesting part takes place. You can use the app in HTTP requests in your app (Example Here) with the URL of the request you want to make. For example, if I wanted to get results for hotels with my coordinates, I would use this URL:
http://api.tripadvisor.com/api/partner/2.0/map/42.33141,-71.099396/hotels?key=<YOUR KEY HERE>
The response would be some JSON code which you can parse with Swift's built-in JSON parser, NSJSONSerialization. With this data, you can now store and make use of what you needed from their API.
To see the full API documentation of all the requests you can do and their details, just visit the TripAdvisor API Documentation.
Hope this helps,
Gabriel

Related

How to call WiziQ API from iOS?

I want to integrated WiziQ api with my iOS app. I have created account on it but i do't getting how to call that api using "Access Key" and " Secret Key". I have lots of googling but not getting any idea to how to create User authentication and call list of api.If any one have idea let me know.
Wanted to share that WizIQ API is not open source. You cannot integrate it with your iOS App by yourself. However, you can get it done through WizIQ itself as they provide whitelabelling services for the app.
Hope it helps.
If you simply scratch the surface of the WizIQ developer site, it reveals the following about receiving the keys you speak of, specifically on the Get API Keys page:
To obtain an API key, you need to upgrade your account. Contact our sales team here or call
us at +1-919-647-4727.

YouTube API from V2 to V3 migration

I'm still using old V2 api and now i get https://youtube.com/devicesupport.
My current request is:
https://gdata.youtube.com/feeds/api/users/{username}/uploads?alt=jsonc&max-results=15&v=2
There is no authentication required to make that call
Question:
Any idea how to achieve the same with new Google V3 API? I check documentation but didn't found answer for that.
I had the same problem with V3 api. I think you can't access videos informations without authentication anymore, but you don't need to use an OAuth to get a snippet from some video or search. I was searching a simple solution for my app, because I just want to request title, thumb and descriptions.
The new url will be:
https://www.googleapis.com/youtube/v3/videosid={VIDEO_ID}&part=snippet&key={YOU_API_KEY}
You need to access google developers console, enable youtube api and your public access key - on credentials (API KEY), so they can relate your app to all requests.
And I found this example in PHP if you need to parse JSON result:
http://www.leenooks.com/php/parsing-youtube-v3-json-with-php-examples.html
I'm still don't know all the limitations of V3, I was using V2 too, but maybe for uploads, or more control for youtube accounts you'll have to use OAuth.
I hope this will help you.

IOS twitter feed tutorial

I am currently building an app where they require all their users to be able to view their feeds only.
I looked at a lot of tutorials online which talk about the new api v1.1 of twitter and now authentication is required at all times.
I see a lot of examples and even successfully followed several of them like
http://www.appcoda.com/ios-programming-101-integrate-twitter-and-facebook-sharing-in-ios-6/
I even saw a tutorial posted on the twitter dev page.Following all of these focused on a few key elements
Using ACAccount to retrieve the account settings of the current user
Using the SLRequest to encapsulate the HTTP request made to the twitter api
Retrieving the data in JSON format, parsing it and presenting it to the user
Well my question is, I do not want user specific feeds. It's like a company updates their twitter regularly, users using the app should get feeds regarding the company. So I was wondering if there was a way, the app provides some default or hard coded authentication information ?
Is there some sort of tutorial, library or anything out there to help me move in the correct direction ?
Thank You for your time and help.
Your going to want to implement the following API call to get that information:
https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline
Once your application is authorized you can make a call to,
https://dev.twitter.com/docs/api/1.1/get/statuses/MorleyGaelsGAA.json
That should give you the information you're looking for.

how to find people via Twitter API?

I'm developing a network that people can add friends to and I want to give them an option to fine their friends via Twitter.
I'm trying to find that feature in the Twitter API.
How can this be done?
here you can find the API for what you're asking:
http://dev.twitter.com/doc/get/friends/ids
as you can see, you have to make an HTTP GET request using this URL:
http://api.twitter.com/version/friends/ids.format ("format" could be xml or json)
you must specify user_id and username to avoid ambiguities.

How to download Facebook page posts

I am an iOS developer and I am writing an app which needs to take statuses from my Facebook page and and display them in my app.
Does the Facebook API support that?
If it does, can anyone give a link for some tutorials or explain how can I make this?
I know that API supports an RSS feed but i don't found how to feed my statuses.
If you're using a Facebook page, you can easily use the graph API to query for posts made by that page. For example, for Starbucks:
http://graph.facebook.com/Starbucks/posts
You can simply load this in your browser to see the format the data comes back in, and all that's needed to access this data is a simple HTTP request. You can replace Starbucks with your Page's ID or username to get your Page's posts. These come back in JSON, which should be fairly easy to handle on your end.
Yes, the Facebook Graph API allows you to access your profile and extract any information you'd like from it.

Resources