I'm using this code to pop up a Facebook dialog and to allow the user to make a wall post, but the user name doesn't appear. I'd like that the post seemed like "USERNAME is using..."
Facebook *facebook = [[Facebook alloc] init];
SBJSON *jsonWriter = [SBJSON new];
NSDictionary* attachment = [NSDictionary dictionaryWithObjectsAndKeys:
@"is using.... etc etc", @"name",
@"A caption", @"caption",
@"A description", @"desc开发者_运维问答ription",
nil];
NSString *attachmentStr = [jsonWriter stringWithObject:attachment];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
API_KEY, @"api_key",
@"Something to say", @"user_message_prompt",
attachmentStr, @"attachment",
nil];
[facebook dialog:@"stream.publish" andParams:params andDelegate:self];
This code works but before "is using...." nothing is printed. The user name doesn't appear. I didn't succeeded in finding a sample, clear docs, to understand this. Any ideas?
You can get the current user data by fetching the json object for "me"; graph.facebook.com/me
精彩评论