ios - Retrieving Twitter OAuth Token using Social Framework (iOS6) -
ios - Retrieving Twitter OAuth Token using Social Framework (iOS6) -
i'm little confused how twitter oauth token using ios social framework. assuming have facebook , twitter business relationship setup on ios6, , can acaccount. when check acaccountcredential facebook acaccount oauthtoken property set twitter acaccount isn't. every other detail twitter acaccount set acaccountcredential not.
to add together confusion came across article on using reverse auth oauth token (https://dev.twitter.com/docs/ios/using-reverse-auth). article talks calling https://api.twitter.com/oauth/request_token , passing in dictionary of oauth_* params params e.g. consumer_key, nononce, etc. but, certainly attaching acaccount slrequest serves purpose? in event error "failed validate oauth signature , token" when seek this.
so question should seeing twitter oauth token in acaccountcredential, or should using reverse auth? , if so, need explicit pass in nsdictionary containing oauth_* params or attaching acaccount sufficient?
let's reply in few steps, there few things need addressing/clarifying.
acaccountcredentialthis object used in co-ordination acaccount object, in order accounts framework able authenticate user particular account. not designed read @ will; supposed used when need save business relationship accounts framework.
documentation twitter states need populate acaccountcredential if you're migrating accounts framework manage user's accounts, instead of using own servers, or in case of older ios application, managing accounts locally.
apple in documentation credentials aren't able read after business relationship has been saved accounts framework.
for privacy reasons, property inaccessible after business relationship saved.
as such, reason why twitter provide ability using reverse authentication, in case still need oauth token server side management. don't know why you're able facebook account, twitter can't jump straight pre saved acaccountcredential.
using twitter's reverse auththe documentation provided twitter (linked in question) makes process clear on need in order access oauth access token, i'll seek clarify few things may not clear.
there framework required, in add-on accounts , twitter framework, create work; social.framework
. create sure imported, create requesting token considerably simpler.
as request need send, twitter not aware of acaccounts. remember reverse auth process not specific ios, can done computing device access web. such, need send http post request https://api.twitter.com/oauth/request_token
specified parameters (oauth standard ones + x_auth_mode
). bit more clarity on required parameters can found here, link in question create clear parameters required. required provide own nonce, , other parameter values.
you can utilize slrequest class or afnetworking create post request twitter, passing in nsdictionary parameter values (as seen in code sample in twitter's documentation access_token
).
after answering 2 points, think it's clear you'll need utilize reverse authentication in order access right oauth token needs. twitter documentation makes clear on need (it provides code samples can use), need aware of general oauth request/response management in order so. can't attach acaccount, need populate dictionary required oauth parameters, , pass in http post request request_token
. have provided considerable number of references refer to, , hope that'll set on right path.
ios twitter-oauth social-framework
Comments
Post a Comment