views:

589

answers:

3

Hi all,

is possible custominzing the FBdialog??, i have already modify the attachment on the dialog when the user wants to publish a post; but i need to make hidden the textfield that the dialog presents...there is a way to access to this property or it's just a webView that load a page from facebook's server?

sorry for my bad english!

thanks in advance

+1  A: 

Yes, this is possible. just design your own UI and pass the message to a method containing this code:

NSString *message = @"test message here";
NSMutableDictionary *params = [NSMutableDictionary dictionary];
[params setObject:message forKey:@"message"];
[params setObject:toID forKey:@"target_id"];
[[FBRequest requestWithDelegate:self] call:@"facebook.Stream.publish" params:params];
Henrik P. Hessel
thank for your reply..!..but if i want just hidden the textfield without recreate my own instance of FBStreamDialog ..is possible?
Mat
it's the same functionality behind the FBStreamDialog. Just try it.
Henrik P. Hessel
A: 

The self was not defined for me and therefore I changed it to:

    NSString *message = @"message to be send";
    NSString *ud = @"user id";

    NSMutableDictionary *params = [NSMutableDictionary dictionary];
    [params setObject:message forKey:@"user_message_prompt"];
    [params setObject:ud forKey:@"target_id"];

    FBRequest *request = [FBRequest request];
    [request call:@"facebook.Stream.publish" params:params];

But it is not working. Have you any idea, what I am doing wrong?

OK, I've solved it.

mitec
A: 

what is target_id?I use this code,but occur a error: "The user hasn't authorized the application to perform this action"