iOS - Can't send Facebook requests -


i have problem ios application because don't seem able send requests people... here code have:

nsmutabledictionary* params = [nsmutabledictionary dictionarywithobjectsandkeys:nil];  if([fbsession activesession].isopen) {     [fbwebdialogs presentrequestsdialogmodallywithsession:[fbsession activesession] message:@"join me." title:@"invite" parameters:params handler:^(fbwebdialogresult result, nsurl *resulturl, nserror *error) {         nslog(@"%@", [fbsession activesession]);         if (error)             nslog(@"error sending request.");         else {             if (result == fbwebdialogresultdialognotcompleted)                 nslog(@"user canceled request.");             else if(result == fbwebdialogresultdialogcompleted)                 nslog(@"request: %@", resulturl);             else                 nslog(@"error unknown.");         }     }];         } else {     [fbsession openactivesessionwithreadpermissions:@[@"email"] allowloginui:yes completionhandler:^(fbsession *session, fbsessionstate status, nserror *error) {         if(session.isopen) {             [fbsession openactivesessionwithpublishpermissions:@[@"publish_actions"] defaultaudience:fbsessiondefaultaudienceeveryone allowloginui:yes completionhandler:^(fbsession *session, fbsessionstate status, nserror *error) {                 if(session.isopen) {                     [self showrequestforfacebook];                 }             }];         }     }]; } 

every time request: (null). i request id nothing on account. looked @ sample in facebook sdk , seem have same. however, works sample , not code. there change somewhere? on developers.facebook.com?

edit: forgot in same application use slcomposeviewcontroller share on facebook , works perfectly.

thanks lot! :)

  nsstring *query2 = [nsstring stringwithformat:@"select uid, name, pic_square,is_app_user user  is_app_user = 1 , uid in " @"(select uid2 friend uid1 = me())"];  // set query parameter nsdictionary *queryparam2 = @{ @"q": query2 }; // make api request uses fql [fbrequestconnection startwithgraphpath:@"/fql" parameters:queryparam2  httpmethod:@"get"                                             completionhandler:^(fbrequestconnection *connection,                                                                id result,                                                                nserror *error)                                            {                                              if (error) {                                              } else {                                             // nslog(@"result: %@", result);                                              // friend data display                                              nsarray *friendinfo = (nsarray *) result[@"data"];                                               nslog(@"%@",friendinfo);                                              self.data=friendinfo;                                             [self constructdictionaryofnumbers];                                              // show friend details display                                              }                                            }]; 

}


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -