user605957
user605957

Reputation: 2489

How do I make my iPhone application pass in my Facebook auth token to my web server?

I have a web server that requires the browser clients to first authenticate with Facebook and then uses that session to access the Facebook PHP SDK and interact with Facebook. The client never talks to FB directly, only the web server does

I want this same scheme on my iPhone app... to have iPhone login with FB and then I use the NSURL API to talk to my web server and have the cookie passed through.

Any way to do this?

Upvotes: 0

Views: 301

Answers (2)

name-it
name-it

Reputation: 2358

Integrate the FB ios sdk with your app. Facebook sdk will return the access_token of the current user who logged through the app.

However we cannot set the domain cookies by NSURL.Its a different concept called cross domain cookies

Upvotes: 0

Mathew Varghese
Mathew Varghese

Reputation: 4527

You can download the Facebook SDK for ios from GitHub. Also the documentation for how to make Auth with facebook from your iPhone app is available here. Then you want to develop an API on your server side inorder to pass the token given by Facebook Auth to the server from your app. Thats it. You can use NSURLConnection to talk with your server. Hope this helps you.

Upvotes: 1

Related Questions