Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 04-08-2011, 10:15 AM   #1 (permalink)
Registered Member
 
Join Date: Oct 2010
Posts: 19
Darkie is on a distinguished road
Default Facebook SSO + Feed integration in iPhone app

Hey, I'm back with some strange, mindtwisting questions.
Sorry if it's the wrong section.
I'm implementing a small social network and I would like people to be able to register using their own data from FB. I implemented the SSO described here: Mobile Apps - Facebook Developers and I call the window that asks for permissions on a button click within my app.
The first question is: where is the user data stored? I have this facebook variable but I couldn't find an API where it's described how to access the information got from the FB login. Moreover, related to this, would it be possible to also have the password from FB shared within my app (same password for FB and my app without user typing it)?

The second question is, I have this code now:
Code:
- (IBAction) triggerFB{
    
    NSArray* permissions =  [[NSArray arrayWithObjects:
                              @"email", @"read_stream", nil] retain];
    
    [facebook authorize:permissions delegate:self];
}

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
    
    return [facebook handleOpenURL:url]; 
}
I don't understand where is the callback or how to call the callback function when the user accepts or rejects the ToS when the window is displayed. I would like to be able to fill out automatically the fields in the registration form if the user clicks on "Agree" (taking the data from the facebook variable), or let them empty if the user doesn't.

Thanks a lot,
Sorry again if it's the wrong section.
Darkie is offline   Reply With Quote
Old 04-09-2011, 02:38 AM   #2 (permalink)
Registered Member
 
Join Date: Oct 2010
Posts: 19
Darkie is on a distinguished road
Default

Up... anyone?
Darkie is offline   Reply With Quote
Old 04-09-2011, 07:11 AM   #3 (permalink)
Registered Member
 
Join Date: Oct 2010
Posts: 19
Darkie is on a distinguished road
Default

I finally started to understand how does this work.
After letting my app access user's data, I call this method
Code:
[facebook requestWithGraphPath:@"me" andDelegate:self];
So that it returns data about the user that I can use.

The problem is that I receive this error:
Code:
{contents = "An active access token must be used to query information about the current user."}
Do some of you know what's going on? Why even though the user accepts it still gives this error?
Darkie is offline   Reply With Quote
Old 04-09-2011, 07:50 AM   #4 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

you insert correctly your valid token on url?
__________________
dany_dev is offline   Reply With Quote
Old 04-10-2011, 01:21 PM   #5 (permalink)
Registered Member
 
Join Date: Oct 2010
Posts: 19
Darkie is on a distinguished road
Default

Quote:
Originally Posted by dany_dev View Post
you insert correctly your valid token on url?
Well, it should be automatically handled by the facebook variable...
Darkie is offline   Reply With Quote
Reply

Bookmarks

Tags
facebook, ios

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 361
13 members and 348 guests
dansparrow, dre, ilmman, LezB44, michelle, Nobbsy, Objective Zero, samdanielblr, Sami Gh, shagor012, sledzeppelin, thephotographer, tinamm64
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,119
Posts: 402,896
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:42 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0