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 > Mac OS X Development Forums > Objective-C, Python, Ruby Development

Reply
 
LinkBack Thread Tools Display Modes
Old 05-23-2010, 03:11 AM   #1 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 39
yaniv92648 is on a distinguished road
Default FacebookConnect API

Hi,
i managed to login to facebook in my app:

session = [FBSession sessionForApplication:API_KEY secret:APP_SECRET delegate:self];
FBLoginDialog* loginDialogFacebook = [[FBLoginDialog alloc] initWithSession:session];
[loginDialogFacebook show];
[loginDialogFacebook release];

and now i wanna post 2 wall:

FBPermissionDialog* permissionDialog = [[FBPermissionDialog alloc] initWithFrame:[self.view frame]];
[permissionDialog setDelegate:self];
[permissionDialog setPermission:@"publish_stream"];
[permissionDialog show];
[permissionDialog release];

the problem is the dialog that's being popped is an empty gray screen..

anyone..?

Thanks!
yaniv92648 is offline   Reply With Quote
Old 05-23-2010, 12:17 PM   #2 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 40
bbc z is on a distinguished road
Default

The permission dialog also needs to be given the session object in the init... initWithSession
bbc z is offline   Reply With Quote
Old 05-24-2010, 06:04 AM   #3 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 39
yaniv92648 is on a distinguished road
Default problem fixed...

not sure if that was the problem cuz i changed a lot of stuff but thanks..
i have another problem in the FBPermissionDialog: "Allow", "Don't Allow" buttons, no matter which button u press u always get the same method:
- (void)dialogDidSucceedFBDialog *)dialog;
i thought the key to know if the user pressed "Allow" or "Don't Allow" was in the parameter "(FBDialog *)dialog" but i can't find it there..
any help would be appreciated..
Thanks again!
yaniv92648 is offline   Reply With Quote
Old 05-24-2010, 07:51 PM   #4 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 40
bbc z is on a distinguished road
Default

Go back to the Github where you downloaded the facebook connect code.. there's an open issue tracker where people are posting code snippets that fix up things like that.. as it stands now, you are right, you don't know which button the user pressed.
bbc z is offline   Reply With Quote
Old 05-25-2010, 03:12 AM   #5 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 39
yaniv92648 is on a distinguished road
Default bummer..

1.
I already checked the "discussion" tab:
Talk:Facebook iPhone SDK - Facebook Developer Wiki
and didn't find anything about the "Allow" and "Don't Allow" buttons..
it's quite unbelievable.. if what u say is true then the PermissionDialog is redundant because no matter what the user clicks i still publish on his wall... r u sure that there's no way of finding out if the user clicked "Allow" or "Don't Allow"??

2.
I wanna close the Post2Wall Dialog (FBStreamDialog):
[dialog removeFromSuperview];
after the user clicks publish but i don't know how to identify the click..

Thanks again man..

Last edited by yaniv92648; 05-25-2010 at 03:17 AM.
yaniv92648 is offline   Reply With Quote
Reply

Bookmarks

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: 464
14 members and 450 guests
7twenty7, AlanFloyd, David-T, imac74, Jaxen66, logan, lovoyl, Music Man, mutantskin, Sami Gh, SLIC, solardrift, unicornleo, usernametaken
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,683
Threads: 94,131
Posts: 402,932
Top Poster: BrianSlick (7,990)
Welcome to our newest member, unicornleo
Powered by vBadvanced CMPS v3.1.0

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