Fetch LinkedIn Contacts/Connections - ios

How to Fetch LinkedIn Contacts in iOS ?
I read their API but in that api to fetch connections are not available any more. Is there are other alternate way to do it ?
I tried OAUTH2 but by that I can only login and get user basic info.
This is how its done in Android . here

As it's mentioned here :
LinkedIn has restricted their open API access, and this no longer works.
This question may be possible duplicate question to: linkedin-api-get-information-about-my-all-connections

As stated here:
https://developer.linkedin.com/support/developer-program-transition
the access for connections have been removed from the public API. You can only get access if you apply to a Partner Program which requires an official review of your app.
The example code you posted for Android doesn't actually use the public API to get the connections, it uses the API to get an access token and then uses the following URL to get the connections in CSV format and shows it in a WebView:
https://www.linkedin.com/people/export-settings?exportNetwork=Export&outputType=microsoft_outlook
If you don't want to use a WebView, you could possible download the CSV output, and parse it to get the actual data.
To parse the CSV you can use a CSV library like the following:
https://github.com/davedelong/CHCSVParser

Related

How to integrate TripAdvisor with IOS APP?

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

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.

Google Places API: iOS key: Request Denied [duplicate]

I'm trying to make an Autocomplete field which should fetch cities as the user types, by using the Google Places API as described in this tutorial:
https://developers.google.com/places/training/autocomplete-android
You've probably found this question around many times before as I did, but none of the answers helped me. Here are the things you should know:
The URL is
https://maps.googleapis.com/maps/api/place/autocomplete/json?sensor=false&key=myKey&components=country:ro&input=whatTheUserTypes
Please don't reply by saying you replaced the API key with your own and it worked - the API key which goes there must be Android specific and won't work from a browser.
So did I make the Android API key using the SHA1 fingerprint obtained from the keystore I signed the app with.
I turned on Maps and Places APIs from the console.
The quota isn't exceeded.
All those and it still gives me REQUEST_DENIED
What I didn't mention is that I have O2Auth activated - does that change anything? Shouldn't it be as simple as putting the API key in the app?
Thanks!
Although this has been answered, I think the community could do better.
I was tearing my hair out about this, it just didn't make sense to me.. I was making an iOS/Android App, so I made an iOS/Android Key...
Wrong.
With Google's Places API, your bundle identifier isn't even considered.
What you really want to do is this:
(I'm using the new User Interface)
1. Log into https://cloud.google.com/console#/project
Select your Project Name, then go into API's & Auth > APIs
Make sure you have Places API Turned on. This is the only thing that needs to be turned on for Places-API to work.
2. Go into Credentials
Click CREATE NEW KEY under Public API Access
3. Select BROWSER KEY
4. Click Create, Nothing Else
Leave the HTTP Refer box empty.
5. Use the Key Generated here
This key will allow ANY user from any device access to the API via your Developer login.
You can try it out here: (Be sure to replace YOUR_KEY_HERE with your generated Key)
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Food%20Sh&sensor=false&radius=500&location=0,0&key=YOUR_KEY_HERE
6. Enjoy
Now you can use that URL above in your Android/iOS device.
The Google Places API does not currently support Android or iOS keys generated from the Google APIs Console. Only Server and Browser keys are currently supported.
If you would like to request this support, please file a Places API - Feature Request.
https://developers.google.com/places/training/autocomplete-android
Storing your API key
Although the above code demonstrates how to communicate directly
between an Android app and the Places Autocomplete service, you should
not store your Places API key with your app.
You should therefore build a web application that stores your API key
and proxies the Places API services. In order to secure communication
between your Android app and the proxy web service, you should require
user authentication to your proxy web service. Your Android app can
securely store user credentials and pass them to your web service, or
the user can log into your web app via an Android WebView.
For the latter approach, your web app should create and return a user
authentication token to your Android app, and your Android app should
subsequently pass this token to your proxy web service.
Go to google cloud platform console>Credentials click on edit by selected your YOUR_API_KEY>Application restrictions > select none option>save thats it.
If you select the android apps option from Application restrictions then google deny the place API with exception REQUEST_DENIED.
In Google dev console, you should be able to find both "Places API" and "Places API for Android"
Make sure to use "Places API for Android"
For some reason, "Places API for Android" is hidden in the API list, but can be accessed using search.
I had the same issue , I fix it by leaving
Accept requests from these HTTP referrers (web sites) (Optional)
in browser key Empty
I am still new, so I cannot comment, but to shed some light on Moe's answer, I resolved some similar Google Maps API issues regarding URL queries (for directions, using Volley) with the following steps:
Get Android API Key (including Google Maps Directions API in my case).
Get "Server" API Key (which seems to be created by using a key restriction of "HTTP referrers" these days - really, it's just used to issue URL queries through HTTP).
Store the Android API key as a meta-data tag in the application tag in AndroidManifest.xml with android:name="com.google.android.maps.v2.API_KEY" and android:value as your key. This is used for direct interaction with the Maps API (minus URL queries).
Use the server API key whenever issuing URL queries.
I am not sure if this also applies to URL queries for the Places API, if you only need the server API key, or if there is a better solution, but this worked for me.
I imagine that it works with just the first key - the one not restricted to Android.
Inside Google Cloud Console type Places and Activate it. Create an API Key and insert it onto your Android Studio App as you would do normally. That`s it.
I had the same problem. For me the key was to enable billing on project. I am still using "Applications for Android" restrictions. After setting up the payment method, Places Api started working.
Prior to using the Places SDK for Android, do the following:
Follow the Get an API Key guide to get, add, and restrict an API key.
Enable billing on each of your projects.
Enable the Places API for each of your projects.
See it there.
Be sure also to check out the billing plans for the Google Places API as it is not free!

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.

Resources