In IOS 5 how do we login to twitter from our application? - ios

All the tutorial I found explains how to tweet and show an alert message if users cannot tweet.
What about if user hasn't logged in to twitter yet and I want to help user logged in to tweeter.
Basically we want to allow user to sign up to our services via facebook and twitter. We've taken care of facebook. Now we need to so it for twitter.
This are samples of tutorial I found
http://www.raywenderlich.com/5519/beginning-twitter-in-ios-5
I don't want to tweet. I just want to login first so I can store the users' twitter id on my database allowing it to save bookmarks, etc..
All I see is https://dev.twitter.com/docs/ios. It's not clear whether we have to compute the sig manually, do we have to open safari or what.

Did you go through api documentation on twitter integration to ios?
Here is a similar question.May be this will help you

If you want your users to login with their twitter accounts, you will have to register your application with Twitter to obtain a key to sign your requests. You can read more about this on Twitter Developer Page

Related

How can My App Tweet the Contents a User Submits?

Note: I am posting this because I don't even know what to Google search. I know we're all about thorough research before asking these questions. Any help would be appreciated.
Scenario: User writes a text post from my app and when they submit it, the content is added to a Parse.com class (I know how to do this) and simultaneously it is tweeted from a designated twitter account (that does not belong to the user) let's say #MyCoolAppThatTweets.
In other words, I don't want the user via my app to be permanently logged into #MyCoolAppThatTweets twitter account, but have one-time access to send a tweet from it.
Another way to phrase this question would be: How can my app log into a specific twitter account whose credentials I can "bake" into the app without compromising the security of that twitter account.
I am already aware that normally, users of an iOS app wouldn't automatically want their content being tweeted. For the project I'm making, this is not going to be a concern (it's a secret).
If you need more information or if I need to post this elsewhere, please let me know!
From your question I am not sure if you are familiar with "Twitter part" of Parse.com and Twitter REST API. If not please start by reading this https://www.parse.com/docs/ios/guide#users-twitter-users (or take a look on official Twitter way by using their plugin called Fabric: https://dev.twitter.com/)
Since you mentioned PFUser I will describe you how to achieve it by using Parse.com API.
First your user must be logged in to Twitter account.
I suppose that your user is already logged in into your app as a PFUser so best way to log him into some Twitter account is by linking Twitter account with existing PFUser - https://www.parse.com/docs/ios/guide#users-linking.
After that you can post tweets through user's Twitter account (if permission was granted). I recommend doing that using Parse.com Twitter API calls https://www.parse.com/docs/ios/guide#users-login-amp-signup. To create API requests you need official Twitter REST API which can be obtained here https://dev.twitter.com/docs/api.

MVC Facebook Login

I am working on one application which require Facebook Login.
I went through various blog and it is clear how to implement facebook or any other third party login. However just bit confused regarding login persistence/ Or process when user comes to website second time.
What i need is
User come on website and can choose wether he want to register or want to login with facebook.
Once he log in with facebbook i need some additional information from him and i will store that information along with his userid in the database.
If he log off, and comes again to website he will again provide his facebook login details.
once he do that i will get his facebook user id and with the help of that i can create a session easily.
BUT not in case he is already logged in from facebook in the browser and if he try to browse my website, then i have to redirect him to authorized page directly. In that case i have to implement a solution which will take care of this issue. While searching i found one blog which might be the way how to implement it. Facebook Login Filter
But is there any other way i can achive it?

Retrieving public Facebook data from a user session without authentication (How does Pinterest do it?)

If you go to pinterest whilst logged into a facebook account and not logged into pinterest, it shows a list of your friends that have pinterest accounts along the top.
I'd like to build something similar to this so my question is twofold.
How can my site find out the facebook details of the current user if they are currently logged into facebook without them authenticating with my site? I assume I can find this in their session somehow.
As I understand it, facebook graph does not give you access to a users friends list until they have authenticated with you. If this is true, how are pinterest able to display all my friends that have signed up to them? Have they saved to a database everyones friends when they sign up and matched me with that list? Surely theres an easier way.
My site is written in rails so any answers relating to this would be ideal. Though I know this is more of a theory question so any help would be welcomed!
Pinterest is using a "Social Plugin" called Facepile. Have a look at https://developers.facebook.com/docs/plugins/facepile for an introduction.
They are also using Facebook Login (https://developers.facebook.com/docs/facebook-login/v2.0), and therefore use a Facebook App and the JavaScript SDK in the frontend. This App's ID is the input parameter for the Facepile, which calls FB backend services to determine the friends of the logged-in user who are also using this specific App.
They are using the Facebook's Faceplie plugin.
Example-
<iframe class="fbIframe" src="http://www.facebook.com/plugins/facepile.php?app_id=APPID&size=small&max_rows=1" scrolling="no" frameborder="0" allowtransparency="true">
</iframe>

RAILS - Facebook login without facebook confirmation page using rails

I'm here to discover if what I want to do is possible or not. Can I connect to facebook using a rails method without passing through the facebook confirmation page?
I want to implement an app that should have a facebook acc/pass and I need to send a comment in a timeline, but I don't want to allow the facebook page. I want to do something automatic.
Thanks!
No, the facebook api in rails is built in a way that you can't directly login to your site using facebook. This is restricted for facebook authorization issues and it's terms and conditions.
If the user wants to allow access, he’ll have to log into his account (still on the facebook page) before being redirect back to your application. In the background Facebook will return an access token that your application will use to get access to the users data.
Check this for more details.

How to authenticate that user owns twitter account?

I'm developing a social network. Users may register and share their twitter username (if they want). Wherever the user posts a comment or other content, his username is displayed. I would like to display the follow #userTwitter button, if the user has set the twitter account.
Now, everything works, the problem is to validate that the user is the owner of that twitter account. Right now the user could be entering any valid twitter account! Maybe using the Twitter api?
You can set your app up as a Twitter client, this way your user has to log into twitter to authorize your app, thereby verifying their twitter identity.
This is a couple years old but might be enough to get you started:
http://www.1stwebdesigner.com/tutorials/twitter-app-oauth-php/

Resources