How to integrate Tripit on ios? - ios

I need to add to my iPhone app a log-in btn through Tripit.
I understand that I need to connect through OAuth and then integrate Tripit API.
But I don't understand what is going on, which part of the code (of both OAuth and Trippit) should I implement? and where (is the whole OAuth code with the log-in supposed to be called when pressing the log-in btn?).
Does anyone have maybe an example? Or a lighter explanation for the API for ios?

OAuth is used to connect your app to the user's Tripit account. After connecting, you will have OAuth tokens to store and use when making the API requests. Here is some information from a Tripit person on suggestions for OAuth and JSON libraries to use on iOS.

Related

OAuth2.0 in iOS?

I am trying to use FitBit api in iOS application. I have a fitbit device and I am trying to create an iOS app that connects with the FitBit api and gets my data back. I am trying to implement OAuth2.0. I already have the client ID but I have been stuck. I am not sure how to proceed with this. I have read the documentation on how OAuth works and how fibit works with OAuth2.0 . My problem is I don't know how to open the fibit api authenication by the user, and how to get the access token. How do I proceed after getting the access token.
I am a noob to this, so I would appreciate if somebody can guide me how to go with that. If someone can guide me to similar projects it will be awesome.
Thanks
Implementing OAuth isn't a simple task. I started with Christian Hansen's OAuth Example and modified it to work for my project (his is for Google, but it can be changed to work with FitBit or anything else).
You can also check out one of the many OAuth Client wrappers on GitHub. Those two should get you close enough that you can start asking more specific questions.

IOS to Instagram API --> Signed Request

I'm having some trouble understanding the Instagram API and can't seem to find a clear answer online. What is the difference between Server-side flow and Implicit flow in terms of security? I understand there is an additional step for exchanging a code for a token when using Server-side.
I am in the middle of developing an IOS app that uses the server-side flow. I am storing the client-secret within the IOS app itself and am not using an actual web server for any part of my requests. Does this method pose any security issues as the API states: "You should never ship your client secret onto devices you don’t control". Do all IOS apps using the server-side flow have a matching server side component or am I missing something here?
The method above is working for me and I am able to access the instagram API. However, I am now running into the 30 like per hour limit and want to figure out how to lift this. I understand that I need to send a signed request to the API using X-Insta-Forwarded-For header. Can this be done within Swift/Objective-C? I am having a hard time find a method for sending this information. The closest I have come to an answer is in the following post: Instagram Signed API Call from iOS
Can this be done? Thanks for the help!

NodeJS, Facebook API, Xcode

I am trying to create an ios App that talks to a backend API written in nodejs. The backend also has an accompanying webapp also written in nodejs. The idea is that you can login (using facebook-js) on either the app or the webapp and post things to to.
My question is this, let's say that the user decided to login using the ios App, then call some backend API method to post an article, how do I make this work without essentially forcing the user to login twice?
Not sure if I'm making sense, any help would be greatly appreciated!
As Facebook uses OAuth for the client authentication, it's relatively easy to store the Access Token resulting from the login process somewhere on your server, and use them later.
Have a look at Design for Facebook authentication in an iOS app that also accesses a secured web service
Also, see https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow/v2.1 which outlines the login process and the storage of Access Tokens.

iOS 4.0 Twitter Integration

I am developing an application that requires login with social media (Facebook, twitter). From these services I just need to obtain the session tokens. So, when the user presses the "Login with Twitter button", I want to have a sign in method similar to what the Facebook application does, where it signs in the user and then returns with a session token.
I would like some pointers on where to start. I searched the official API documentation, but is seems developing with Oath is way complicated and demands time that I can't afford to devote at this point. I stumbled upon MGTwitterEngine, But I failed to see a way of obtaining the OAuth's session's token, and also, it hasn't been updated in 3 years! https://github.com/mattgemmell/MGTwitterEngine
Can anyone point me into the right direction?
You should use the APIs and OAuth. It would probably be more difficult and take longer to try to avoid OAuth. Just put up the twitter or facebook login pages in a UIWebView and go from there.
Getting the oAuth token from Facebook is very straight forward, the iOS facebook API provides it. Getting the Twitter API token is just a matter of parsing the URL that is returned to you. Niether is very difficult.

RPXnow Facebook Connect - Use and Level of support?

I am using RPXnow.com authentication solution for a rails app and am now at the point of wanting to develop Facebook integration features using Facebook Connect and the client api. What I am unclear on from RPXnow docs is the level of integration their solution provides. When a user connects via rpx using their FB creds, are they now using Facebook Connect? Can I make calls to the client api from my app? Do I need to use the RPX api to access the FB client APIs?
Anyone with experience using both who can shed light here, much appreciated.
dnewman,
Great question. Facebook Connect is simply a javascript layer built on top of the Facebook Platform APIs. RPX uses the platform APIs to authenticate the user, and after they have signed in, you may safely use the native Facebook Connect javascript to implement FB specific features on your site like posting activity back to the News Feed. You just need to set your connect URL on the facebook developer site and drop in the Facebook Connect javascript and then start implementing. After authenticating via RPX, the user will already have approved and "connected" to your website, and you'll have access to the breadth of Connect directly.
Also, if you have an RPX Plus/Pro account you can make simple RPX API calls to set a user's status and post activity on Facebook (and Twitter/MySpace).
Brian Ellin
RPX Product Manager
Once you've hooked up RPXNow (JanRain) single sign-on, you can follow the Facebook documentation. The Server-side Personalization example is in PHP but the idea is the same in any language.
// Fetch the user's friends
$friends = json_decode(file_get_contents(
'https://graph.facebook.com/me/friends?access_token=' .
$cookie['oauth_access_token']), true);
$friend_ids = array_keys($friends);
The key point to note is that the $cookie['oauth_access_token'] referenced in this example needs to be the string returned by the RPXNow sign-on API response in the JSON field
['accessCredentials']['accessToken']
Hint: from your RPXNow dashboard, check out the Test Sign-In Widget page under Resources to see where that token is in the response.
Initially I thought this would be hampered by having your Base Domain set to rpxnow.com in your Facebook Application settings, but this is not the case. It works fine.

Resources