1

我得到了这个错误-

ostPictureButtonPressed:  {"error":{"message":"(#100) param tags must be non-empty.","type":"OAuthException","code":100}}

我的代码是

NSMutableDictionary *variables = [NSMutableDictionary dictionaryWithCapacity:6];


    UIImage *picture = [UIImage imageNamed:@"Default.png"];

    //create a FbGraphFile object insance and set the picture we wish to publish on it
    FbGraphFile *graph_file = [[FbGraphFile alloc] initWithImage:picture];

    //finally, set the FbGraphFileobject onto our variables dictionary....
    [variables setObject:graph_file forKey:@"file"];


    NSArray *arr=[[NSArray alloc]initWithObjects:@"100001912715296", nil ];

    SBJsonWriter *writer = [[SBJsonWriter alloc] init];
    NSString *jsonString = [writer stringWithObject:arr];

    NSLog(@"The jason string is %@",jsonString);


    [variables setObject:jsonString forKey:@"tags"];
    [variables setObject:@"110506962309835" forKey:@"place"];


    [variables setObject:@"Hello friends I am using MySafety App.\n This is a must have app for all peoples whether you are a working lady, a house wife or a school going girl.This app lets you save 6 emergency contacts whom you want to alert in case of emergency.Whenever you feel you are in danger, just press the SOS button and it will send sms to your contacts with your current location and a alarm will go on with flashing lights" forKey:@"message"];

    //the fbGraph object is smart enough to recognize the binary image data inside the FbGraphFile
    //object and treat that is such.....
    FbGraphResponse *fb_graph_response = [fbGraph doGraphPost:@"117795728310/photos" withPostVars:variables];
    NSLog(@"fb_graph_response %@",fb_graph_response);

    NSLog(@"postPictureButtonPressed:  %@", fb_graph_response.htmlResponse);
4

0 回答 0