views:

659

answers:

2

Hi,

I want to publish information to user's wall from iphone application. I am using the Facebook SDK for iphone. I found in the documentation that I should use FBStreamDialog but this loads a form to the user and s/he write the story to be published, I don't want this behavior. I want to publish user actions at my application and user just needs to click share button, then the application should fill a template story and publish.

I found this use case was available before with FBFeedDialog but this is not supported via the API now.

Any suggestions, what I should do?

//Modified

here's an example for David's solution:

NSString *att = @"{\"name\":\"i\'m bursting with joy\",\"caption\": \"User rated the lolcat 5 stars\", \"description\": \"a funny looking cat\"}";
NSDictionary *attachment = [NSDictionary dictionaryWithObject:att forKey:@"attachment"];
[[FBRequest requestWithDelegate:self] call:@"facebook.stream.publish" params:attachment];
+1  A: 

@"stream.publish"

David Sowsy
Do u have an example?I read the wiki, http://wiki.developers.facebook.com/index.php/Stream.publish, but FB SDK for iphone doesn't have a corresponding class for calling facebookAPI.
Noura
thanks David, I added an example at the original post for better looking.
Noura
Glad I could head you in the right direction. FBs APIs can be daunting.
David Sowsy
+1  A: 

I use this code occur error "The user hasn't authorized the application to perform this action"

Yes, user must give you permission before you can publish any feeds, check this http://wiki.developers.facebook.com/index.php/Facebook_iPhone_SDK#Getting_Extended_Permissions.and the FBConnect project have the code for asking user to give the permission.
Noura