What's the correct log-in response for twitter (for iPhone) with my custom APi


I am writing a custom API for twitter which will be used in Twitter for iPhone. what’s the response my third-party API gives to twitter can make twitter think the user is logged in.

I know the twitter for iPhone auth step is using XAuth to /oauth/access_token, when it is set my API, I will gives the response ‘oauth_token=191074378-1GWuHmFyyKQUKWV6sR6EEzSCdLGnhqyZFBqLagHp&oauth_token_secret=NpCkpRRC5hGEtikMLnQ2eEcEZ0SIVF5Hb2ZgIwmYgdA&user_id=191074378&screen_name=oauth_test_exec&x_auth_expires=0’ directly to twitter for iPhone. but twitter tells me server intern error rather than a correct response. what is the incorrect part ?