iphone - Login issue in facebook integration -
i have integrated facebook in ios 6 noticed unusual behaviour of app. whenever seek login using facebook works fine when other user his/her credentials tries login, error shows up. don't know what's solution it.
i using facebook sdk sample code reference. login setting view frame login. protocol implementation fbloginview follows:
- (void)loginviewshowingloggedinuser:(fbloginview *)loginview { bool canshareanyhow = [fbnativedialogs canpresentsharedialogwithsession:nil]; // first buttons set login mode self.poststatusbtn.enabled = yes; self.sharewithfriendsbtn.enabled = yes; self.viewfriends.enabled = yes; } - (void)loginviewfetcheduserinfo:(fbloginview *)loginview user:(id<fbgraphuser>)user { // here utilize helper properties of fbgraphuser dot-through first_name , // id properties of json response server; alternatively utilize // nsdictionary methods such objectforkey values json object // setting profileid property of fbprofilepictureview instance // causes command fetch , display profile image user self.profilepic.profileid = user.id; self.loggedinuser = user; nslog(@"%@",user); } - (void)loginviewshowingloggedoutuser:(fbloginview *)loginview { bool canshareanyhow = [fbnativedialogs canpresentsharedialogwithsession:nil]; self.poststatusbtn.enabled = no; self.sharewithfriendsbtn.enabled = no; self.viewfriends.enabled = no; if (!self.viewfriends.enabled) { self.viewfriends.titlelabel.textcolor = [uicolor graycolor]; } if(!self.sharewithfriendsbtn.enabled) { self.sharewithfriendsbtn.titlelabel.textcolor = [uicolor graycolor]; } if (!self.poststatusbtn.enabled) { self.poststatusbtn.titlelabel.textcolor = [uicolor graycolor]; } self.profilepic.profileid = nil; self.loggedinuser = nil; }
thanx in advance...!!
i think prepare issue:
go facebook app in facebook account. click edit app. go basic info tab. sandbox mode: check disable save setting.this work you.
iphone objective-c facebook ios6
No comments:
Post a Comment