Oauth library for iOS (in particular Yelp) - oauth

I want to add Yelp search into my application.
To do this I need to use Yelps Oauth authentication. This sounded easy as I've made some server applications before.
However, I keep getting an INVALID_SIGNATURE with the code I have created to make and retrieve data from a constructed URL.
I have checked the signature output by my app and it is exactly the same as the one they provide at http://api.yelp.com (I've even checked the two strings (before the hashing) at http://www.textdiff.com and they said they were the same)
It seems I hit a dead end and cannot get around this error.
Can anyone point me in the right direction with why my signature might not work
and/or
Can someone point me to a good iOS Oauth tutorial and library (any library I have found has poor documentation on how to use it)
Thanks

Related

Is it possible to add hyperlinks/deeplinks to images in Apple PassKit?

I'm currently exploring the capabilities of custom passes in Apple Wallet.
One thing I would like to do is enable users to be able to go to my website if they click their gift card's icon.
However, after looking through the documentation - there doesn't seem to be any support for this basic ask.
The closest thing I was able to find was adding URLs to the back of the custom passes. Anyone know of a workaround?
I'm looking for the same thing.
I'm surprised people praise Apple Wallet passes that much, when it's really bad to work with.
Everything is file based, and you have to create a physical zip-file.
Google's approach is much better imho: everything is done via an API, so the pass itself is just a url with a token. Sharing a Google Pass is so much simpler and works everywhere.
Updating a pass is simple; just call the Google Api and everything will be ok. Images and assets are urls. Much much better to work with.
Updating an Apple pass involves fricking Push notifications, it's mind bogglingly complex compared to Google's solution.
Oh well

The restful api function is good to iOS?

i'm a mobile-develop engineer.work on IOS platform,using Xcode.
a few days ago.the man server developer has been changed in our company.he said the popular way of developed is using the template whose name was Restful API,then I was starting know something about the Restful api.
what i knew the thought of the template was the server need only developed the just the one http-interface.they didn't care whatever clients how to requested and how hardly used.
i didn't agree that, example in the page.the requirements is search friends depends on the text which user input on search-bar.
the 1.0 version is just searched the information which key included name.maybe we will send the requestPostDate=xx(which user inputed),filter=name.
the 2.0 version is searched the information which key included name、sex、age or your personal description.but I can't changed the requirements as soon as possible. because i have been wroten filter=name.
what should we did if it should changed in 1.0 versions on AppStore platform.
so what we did is modified the code which filter=name,sex,age. and upload the new library(IPA),then send it to AppStore.hope it's successful during these days.
what i need to say is if we not using restful api.we can be controlled by server.we just tell them we had a key which is xx,the clients didn't care about what the logic of how to search, it easier? and it changed quickly?the client didn't modified any code.maybe we have Web-platform、IOS-platform、android-platform.
i don't know what's the template your company using now.if it's restful api.please tell me how to fix about the questions what i said before?
the problem what i said is the restful api is suitable in IOS platform? maybe is suitable in Web platform,but not suitable in Mobile-developed-platform.
do you agree what i said? if not.give me some point which you think is right please.

What's the proper and correct way to access files on O365 from iOS

I know that someone mean will probably close this question for being opinion, but the truth is, I'm not after opinion as such, but actual facts about the correct way and how to do this.
I've been searching around for quite a time and I'm still unclear as to what direction to take. It seems there are a billion* libraries that I could use, but I want to know what would be the correct, proper supported method of achieving this.
Essentially, I have a very simple requirement to list and download files from Sites on our Office 365 subscription to an iOS application.
Initially, I looked at the REST interface for Sharepoint and, from a browser, was able to easily perform a GET to our site and receive and receie a response with meta data about the file, for example:
https://mytenantid.sharepoint.com/_api/web/getfilebyserverrelativeurl('/MyFile/Here/Document.txt')
I could also retrieve JSON output instead of XML by specifying an Accept header of application/json using the POSTMAN REST client for Chrome.
So far, so easy. Just the authentication to do outside of the browser and that's it.
Phew!!
I started by looking at Basic authentication, but wasn't sure if this is the right way to do it and even if it would work?
On looking further, it seems that actually, using OAuth might be the way to go. Apparently, you can either do this yourself (no idea how), or use a library (ADAL?) from Microsoft? Unfortunately, this all looks half baked will very little documentation that seems to work. It also requires the use of CocoaPods and workspaces and isn't just a simple library that I can copy to my project and start using (a la SwiftyJSON). There also seems to be a lot of other libraries around too.
I should mention that I'm using Swift, so I've tried converting code from Objective C to Swift (unsuccessfully) too. Apparently I can't use "readWithCallback" with an argument list that the code tells me I should actually use -- even a sample application I downloaded had the same issue.
I've also tried using node.js with a script (not a Web Application) and the documentation and number of libraries available for that is almost worse.
Any assistance to achieve this really simple capability would be hugely appreciated -- it's been driving me nuts.
Many thanks,
D.
*this might be a slight exaggeration.
Office 365 has a RESTful API that you can use any programming language to authentication and integrate in your app.
Here is a simple example for iOS connected app to office 365. The sample shows how to do this in Objective C and SWIFT.
https://github.com/OfficeDev/O365-iOS-Connect
If you want to full iOS samples for office 365 connected apps, Check out this link:
https://msdn.microsoft.com/en-us/office/office365/howto/starter-projects-and-code-samples
Enjoy :)

How does one integrate oauth.io into appery.io?

I am developing a simple mobile app on appery.io for learning / experimental purposes at this point in time. I would love to be able to authenticate users by integrating oauth.io to assist with this.
The oauth.io documentation is written in such a manner that it looks like it should be very simple to do but I'm hitting a dead end and I'm concerned that I'm not doing things correctly or that what I'm setting out to do is impossible.
I am following the documentation provided at the references, below. I've installed the oauth.js file into the JavaScript folder under the project tab on appery's app builder. I confirmed that the HTML code is set (actually, appery.io does this automatically, but I double-checked), and then the next bit of code the documentation suggests triggers an error when I set it to run on "page show" in my app's start screen.
The line
OAuth.initialize('key-goes-here');
triggers an error in the console.log as follows:
Uncaught TypeError: Object #<Object> has no method 'initialize'
the following line that the documentation provides also raises the same error:
OAuth.redirect('stackoverflow', '/auth/callback');
I've scoured Google, appery.io and oauth.io for answers on how to proceed with this but cannot find anything (they seem to be somewhat new services). I don't think that this falls under appery's purview to assist me and haven't heard a reply from oauth.io. At this point, I do not even know if it is possible to do what I'm trying to do or whether it's just me doing something embarrassingly wrong.
If anyone is familiar with both of these services and could explain how to allow for o-authentication of users using oauth.io on appery.io in terms that someone at the lower-intermediate level could understand, that would be wonderful. Have I missed out any important information needed to assist with this?
References:
https://oauth.io/docs/api
How to get current user details logged through OAuth io
infoq. com/news/2013/08/oauth-io
oauth. io/auth/download/latest/oauth.js
Here is a great detailed tutorial how to use oauth.io and Appery.io - http://docs.appery.io/tutorials/connect-with-api-providers-using-oauth-io/
Feel free to contact Appery.io support team via forum - https://getsatisfaction.com/apperyio/

good twitter4j documentation

I have been trying to mess with the twitter4j library for some time now, and cannot seem to get it to work.
The web site and documentation there has proven to be less than helpful, and all the resources I have been able to dig up are really old and most likely irrelevant.
Does anyone have any good resources on this stuff (right now, the oauth portion of it)? I am also trying to use this library via Coldfusion, if that makes a difference.
I have been able to create a (what I believe to be) valid request token and url (as I can get to twitter and login), but when I use the tokens that come back to reconstruct an access token later, it always bombs out with some kind of error...
Yes, the official doc is explaining only basic usages.
Twitter4J is best explained at the example codes located in twitter4j-examples/src/main/java/.
And the community is very active and you can expect getting answers promptly.
http://twitter4j.org/en/index.html#mailingList

Resources