8vius
8vius

Reputation: 5836

Twitter/Facebook OAuth

I'm integrating my web app with Twitter/Facebook and I have a couple of situations I need to sort out but don't have a clue how to do so.

1) I would like the OAuth token to not be shown in the URL, somewhat like http://lockerz.com does with their Twitter/Facebook sign up, as to not get an error saying that the token has already been consumed if the user refreshes the page, but rather properly refresh without the Twitter information.

2) There are 2 cases in which my users can link their accounts to Twitter and Facebook, one is on sign up and the other is in their settings afterwards, how can I manage the callback URLs here? Considering that it's 2 different pages it should redirect to.

Upvotes: 1

Views: 846

Answers (1)

Mark S.
Mark S.

Reputation: 4017

1) You can send the oAuth information in HTTP headers. Twitter even says that they prefer you do it that way.

2) Just use a different callback URL for each case if you need to keep them separate. Since the Callback URL is passed as a parameter when you ask for the request token, you should be easily able to separate them.

Upvotes: 2

Related Questions