0
Vous trouverez ci-dessous le code implémenté dans une application mobile Facebook pour le publier sur le mur de l'utilisateur. Comment faire pour modifier la valeur à Textview.text dans le mur de publication au lieu de l'utilisateur doit taper.Besoin d'aide pour comprendre cet extrait de code Objective-C
- (IBAction)publishStream:(id)sender {
SBJSON *jsonWriter = [[SBJSON new] autorelease];
NSDictionary* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys: @"Always Running", @"text", @"http://itsti.me/", @"href", nil], nil];
NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];
NSDictionary* attachment = [NSDictionary dictionaryWithObjectsAndKeys:
@"a long run", @"name",
@"The Facebook Running app", @"caption",
@"it is fun", @"description",
@"http://itsti.me/", @"href", nil];
NSString *attachmentStr = [jsonWriter stringWithObject:attachment];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Share on Facebook", @"user_message_prompt",
actionLinksStr, @"action_links",
attachmentStr, @"attachment",
nil];
[_facebook dialog:@"feed" andParams:params andDelegate:self];
}
Je le sais. J'ai déjà eu ça. Au-dessus du code est l'échantillon droit? où devrais-je changer à TextView.text – Noob
bien maintenant que vous avez précisé ce que vous vouliez je vais modifier ma réponse –
Je change le code comme ça. Le mur de publication demande toujours à l'utilisateur de remplir la zone de texte. NSDictionary * [attachment = NSDictionary dictionaryWithObjectsAndKeys: @ "Mon nom apps", @ "nom", @ "Mes applications titre", @ "légende", TextView.text, @ "description", @ "http : //myurl.net ", @" href ", néant]; – Noob