Integrating Yelp API v2 into iOS - ios

I am trying to use Yelp API, and I have received ConsumerKey, ConsumerSecret, Token, and TokenSecret from the developer site.
I tried to follow the sample code from GitHub, and I came up with two questions.
Question 1
Is it mandatory to use CocoaPod for OAuth? If not, can I create my own HTTP request?
Question 2
If I can create my own HTTP request, how is the URL structure for Yelp Authentication?
Ex. https://host_address/...
I am new to OAuth, so it will be very appreciated if you can help.
Thank you.

Related

LinkedIn REST Profile API only returning lite_profile response

I have an old iOS application which has the LinkedIn APIs integrated. Now, I want to migrate to v2 since LinkedIn started deprecating v1. So, I changed the login flow to OAuth2, obtained an access_token and included in the header for the Profile API.
["Authorization": "Bearer " + access_token]
For the api : https://api.linkedin.com/v2/me, the response was similar to that of r_liteprofile response, but for other apis like https://api.linkedin.com/v2/people/(id:{profile ID})?projection=(id,firstName,lastName,industryId~), the response was
403: Not enough permissions to access
Since my application already has the r_fullprofile permission(as we can see from the developer console), I have added the same in the authorization endpoint. I want to get all the details from the r_basicprofile and r_fullprofile like educations, industry etc. Someone please help!

HTTP post request with OAuth1 through UrlFetchApp in Google App script

I have a problem signing an HTTP post request with the UrlFetchApp in Google App scripts. I only need to sign the request with my consumerKey, I do not need complete authorization with callback and everything. How would I be able to sign the request using OAuth encoding? Do I simply add the OAuth as parameters or as headers? I am very new to this and would appreciate any advice.
Thanks
Here is an Update on the situation: Google just added 2-legged support to their OAuth1 library. See https://github.com/googlesamples/apps-script-oauth1.
If you are using Google App Script and that library, update it to version 11.
I simply changed the access token in the example to empty string. Now everything works just fine.
Thanks!

how to connect to the site with twitter

How to site login via twitter? I am using tweetSharp. I need to post some data to the site. This site requires twitter authentication
I can create request token:
OAuthRequestToken requestToken = twitterService.GetRequestToken();
But what is next?
The TweetSharp GitHub page has code samples that will help you do what you are trying to do.
https://github.com/danielcrenna/tweetsharp

How to actually use Twitter provider in Kohana?

There are no clear docs or anything. shadowhand's demo repo is broken. How to actually use Twitter Oauth provider in Kohana 3.0?
It's a bit complicated, but the steps basically are:
Build an OAuth_Consumer
Build a OAuth_Provider (twitter)
Get a request token
Redirect them to the authorize_url
Get the callback
Exchange the request token for an access token
Make API calls
Here's an example controller that does all of that: https://gist.github.com/1267793

Flickr oAuth signing requests

Flickr started to support oAuth just few weeks ago and there is no up to date documentation.. I was able to pass oAuth authentication process but I am unable to upload a photo through API.
I am supposed to sign all parameters except photo parameter. This is my signature base:
POST&http%3A%2F%2Fapi.flickr.com%2Fservices%2Fupload%2F&oauth_consumer_key%3D...6b%26oauth_nonce%3D90660%26oauth_signature_method%3DHMAC-HA1%26oauth_timestamp%3D1309888296%26oauth_token%3D72157626975786735-ed7eccb40ffcc69e%26oauth_version%3D1.0d
And I use "consumer_secret&token_secret" to sign it.
It's all written in AS3 with oAuth library but I think it doesn't matter. The response I get is:
"Invalid API Key (Key has invalid format)"
I don't think there is a problem with API key..
Any suggestions guys??
Thanks
It looks like you're using the incorrect Path. The latest Oauth docs are here:
http://www.flickr.com/services/api/auth.oauth.html
you can learn more about signing requests here:
http://hueniverse.com/2008/10/beginners-guide-to-oauth-part-iv-signing-requests/
and I'm not sure what language you're using but here is an example in Ruby:
https://gist.github.com/383159
and Python:
http://web.archive.org/web/20120919234615/http://mkelsey.com/2011/07/03/Flickr-oAuth-Python-Example.html

Resources