Twitter Posts - from client or server? - ios

I'm creating an iPhone app that will allow users to log in with Twitter and for the app to then be able to post on their behalf.
Is it better to make post requests to Twitter from the app or from the server? Why?

For my app I found it easier to do it on the client. If you are looking for a iOS twitter library I have it here https://github.com/narup/PSTwitterEngine Though, you can still post using iOS native twitter support. You will need this library if you are using browser based authentication
Also, didn't want to write extra code on server since i am writing server myself :)

Related

How to send Tweet via your iOS App (NOT Twitter)

In my application I need to generate a link and needs to share on Twitter and Facebook. For Facebook I have used its SDK but for Twitter I am not able to find any such SDK which I can integrate in my app and make it able to Tweet it.
On Twitter site I saw REST API but I think that cannot be used for Tweeting. One more thing, I have integrated the Twitter with the help of Social.framework but in case if user hasn't provided his/her details in iPhone then that code won't work and I think if Twitter App is installed in the iPhone we can just launch the app but I cannot pass Data to be Tweeted.
How would you have handled this situation?
http://wiki.akosma.com/IPhone_URL_Schemes#Twitter
Try using one of these URIs. You need to handle the case where the user does not have the app installed also. For that I believe you will want to launch the browser and send a web intent.

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.

Building a private API with rails

Hello me and friends are planning on taking on a big project. My two friends are going to be building iOS and Android apps and I will be making the server back end. I recently started developing with RoR and have fallen in love with Ruby. Now here are my questions:
Little more background:
I only want a private API for the android and iPhone app. I do NOT want a full fledged OAuth authentication process. Doing some research I think I will go with basic HTTP authentication.
1. My App uses cookie based authentication meaning a cookie has to be passed with each subsequent request. So will my friends need to have to store a cookie and on each subsequent request to the server send the cookie along with it?
2. How do I go about making the API private? I know in OAuth there are consumer secret and consumer key. I know if anyone could simply figure out the URL schema they will be able to have access to the API. How do I protect my back end from request from unknown users? (Hard coding strings in the Apps themselves?, Checking headers for device type?)
3. Should I only build the API now and worry about a web app later? Or would it be too horrific of an experience to go back and build a web app (Although I really do actually want the web app to be more significant than the mobile app
Here is a great article explaining exactly what you're looking for : securing an API without setting up a full OAUTH provider :
http://www.thebuzzmedia.com/designing-a-secure-rest-api-without-oauth-authentication/
Works great (even if the solution is finally not so far from oauth ;)

How to oauth-login a server app via the mobile client (especially iOS, Twitter, but in general too)

We have a web application that supports Facebook and Twitter login/signup via oAuth (and can also post to FB/TW). Now we are building a mobile client and naturally we want people to be able to login-signup via FB-Twitter on mobile as well, on iOS even using system-integrated accounts.
Now mobile app and our server app are two different apps, however, and if I get oAuth correctly, we'll need to have two authentications: one for a mobile client (system account can be used), another one for a server (we'll have to show WebView for it).
Yet some existing apps seem to be fine with single authentication only (e.g. Flickr and Foursquare! At least 4sq seems to be fine with iOS system FB account only. How is it possible?
Do they share consumer key/secret between mobile and web app making it essentially the same app?
Do they use some FB-specific extension to oAuth
Do they only use auth token wherever it comes from making it a user ID?
Something completely different?
Old question, but this may help someone who finds their way here.
Twitter Reverse Auth

Paypal Integration in Blackberry?

Do we hav Paypal API for Blackberry as like the iPhone and Android. I have android PayPal API here https://www.x.com/community/ppx/xspaces/mobile/mep.
But i cant able to find it for Blackberry.
Please help me whether paypal transfer can be made in Blackberry or not.
Try by using this sdk https://www.x.com/community/ppx/sdks#WSDL
As far as I know there isn't a BlackBerry specific Paypal API.
So to get around this, we just launched the browser to the Paypal link. From there they could enter their Paypal credentials and pay as if they were using a desktop browser. It's not as clean as using an API though.
If you're looking for a cleaner solution, you could try creating a Paypal API wrapper for example using PHP, which is used by a proxy page. Then in the BlackBerry, use standard HTTP requests to send GET/POST requests to the proxy page. The proxy page will in turn use the wrapper you created to set up payment for you and your customer. This way you won't necessarily have to leave the application.

Resources