retrieve my wall post in my native i phone application
- by hardik
hello all i want to retrieve my all the wall post that i have posted until now i am using this fql query from my native iphone application in order to fetch it but i think i am maiking some mistake please guide me how could i do that the following is my fql query to get wall post
- (void)session:(FBSession*)session didLogin:(FBUID)uid {
NSString *fql = [NSString stringWithFormat:@"SELECT comments, likes FROM stream WHERE post_id=100000182297319"];
NSLog(@"session key is %@",_session.sessionKey);
NSLog(@"from global key is %@",[twitfacedemoAppDelegate getfacebookkey]);
NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"query"];
[[FBRequest requestWithDelegate:self] call:@"facebook.fql.query" params:params];
this is my other delgate method to get the wall post but this code is not working
- (void)request:(FBRequest*)request didLoad:(id)result {
@try
{
NSLog(@"result is %@",result);
if(result==nil)
{
UIAlertView *a=[[UIAlertView alloc]initWithTitle:@"Can't login" message:@"You cant login here." delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil];
[a show];
[a release];
}
else
{
NSArray* users = result;
NSDictionary* user = [users objectAtIndex:0];
NSString* name = [[NSString alloc]initWithString:[user objectForKey:@"name"]];
NSLog(@"name is %@",name);
_label.text = [NSString stringWithFormat:@"Logged in as %@", name];
NSString *globalfacebookname;
globalfacebookname=[[NSString alloc]initWithString:name];
NSLog(@"value is %@",globalfacebookname);
NSString *fid=[user objectForKey:@"uid"];
NSLog(@"FACEBOOK ID WITH STRING DATATYP %@",fid);
[twitfacedemoAppDelegate fetchfacebookid:fid];
}
}
@catch (NSException * e)
{
NSLog(@"Problem in dialog didFailWithError:%@",e);
}
}
please guide me how could i retrieve my all the post from facebook to my native iphone application through fql query
thanks in advance