views:

262

answers:

2

i try to integrate twitter to iphone app by sharekit i have registerd my application to twitter. i not understand how to setup Callback URL can you tell me more information and step to deploy?

+1  A: 
  1. Open your application settings at http://dev.twitter.com/apps/
  2. 'Application Type' should be set to BROWSER (not client)
  3. 'Callback URL' should match whatever you enter in SHKTwitterCallbackUrl. The callback url doesn't have to be an actual existing url. The user will never get to it because ShareKit intercepts it before the user is redirected. It just needs to match.

So for example, if you set the callback URL on dev.twitter.com to http://example.com/oauth, you should set SHKTwitterCallbackUrl = @"http://example.com/oauth"

Nate Weiner
is that url must be available? i must implement callback to support in this case?
RAGOpoR
A: 

I've you're trying to post a URL to twitter, make sure you also have the Bit.ly account setup in the ShareKit config - otherwise you'll get a MISSING_ARG_APIKEY message appended to what you tweet.

Edit: Above was meant to be a comment. For the callback URL - set it to anything, it won't actually be used. On the twitter page where you created the application (and got your key and secret) make sure you set your application as a Browser application and not a Client application and it will show the field for the callback URL. Then in Sharekit's config just put the exact same URL that you put in the application's details. I just used my own website's address. In Sharekit's documentation it says that the URL will never actually be visited, it's just needs to be known so that when the web browser that's displaying the OAUTH goes to that URL, Sharekit knows the login was finished.

BarrettJ
i have already setup Bit.ly account to Sharekit ,
RAGOpoR
Sorry, that was meant to be a comment relating to another issue I was having, just in case you were as well. Updated with answer to your actual question.
BarrettJ