rsieiro / RSOAuthEngine

ARC based OAuth engine for MKNetworkKit
http://rodrigo.sharpcube.com
150 stars 33 forks source link

Twitter Demo #5

Closed jinwoo-lee-github closed 12 years ago

jinwoo-lee-github commented 12 years ago

WebViewController.m

my idea is that 77 line be wrong

because

request.URL.scheme return values are http or https .

Please check it.

rsieiro commented 12 years ago

We use a custom scheme in the callback from Twitter, and that line is used to detect if the URL we're trying to open is using the custom scheme, so everything is fine there. Check line 34 in RSTwitterEngine.m, the custom scheme is "rstwitterengine".

rsieiro commented 12 years ago

I'm sorry but I don't understand what you want.

Please be more specific.

jinwoo-lee-github commented 12 years ago

i want to know "twitter application" callback value

    1. 23., 오전 11:14, Rodrigo Sieiro 작성:

We use a custom scheme in the callback from Twitter, and that line is used to detect if the URL we're trying to open is using the custom scheme, so everything is fine there. Check line 34 in RSTwitterEngine.m, the custom scheme is "rstwitterengine".


Reply to this email directly or view it on GitHub: https://github.com/rsieiro/RSOAuthEngine/issues/5#issuecomment-5273328

rsieiro commented 12 years ago

As I told you, it's defined at line 34 on RSTwitterEngine.m:

#define TW_CALLBACK_URL @"rstwitterengine://auth_token"
jinwoo-lee-github commented 12 years ago

i see i will try it . thank you

2012년 4월 24일 화요일에 Rodrigo Sieiro님이 작성:

As I told you, it's defined at line 34 on RSTwitterEngine.m:

#define TW_CALLBACK_URL @"rstwitterengine://auth_token"

Reply to this email directly or view it on GitHub: https://github.com/rsieiro/RSOAuthEngine/issues/5#issuecomment-5288749

brendenwest commented 12 years ago

I'm running into the same issue when using this to authenticate on LinkedIn - webview isn't picking up the custom url scheme so it doesn't self dismiss after authentication.

Only change i've made to your code is to add my API keys and the LinkedIn api urls:

// Default twitter hostname and paths

define TW_HOSTNAME @"api.linkedin.com"

define TW_REQUEST_TOKEN @"uas/oauth/requestToken"

define TW_ACCESS_TOKEN @"uas/oauth/accessToken"

define TW_STATUS_UPDATE @"v1/people/~"

rsieiro commented 12 years ago

Try to put a breakpoint at line 77 on WebViewController.m (first line of webView:shouldStartLoadWithRequest:navigationType:). Then check if, after authentication, LinkedIn is trying to redirect you to your callback URL.