user390187
user390187

Reputation: 63

Problem with integrating Facebook in my application

The message which is to posted on the wall of Facebook is automatically open without clicking the Facebook tab.

Here is the code which shows a message to be posted on the wall of Facebook.

- (void)postToWall {
    FBStreamDialog *dialog = [[[FBStreamDialog alloc] init] autorelease];
    dialog.userMessagePrompt = @"Enter your message:";
    dialog.attachment = [NSString stringWithFormat:@"{\"name\":\"Facebook Connect for iPhone\",\"href\":\"http://developers.facebook.com/connect.php?tab=iphone\",\"caption\":\"Caption\",\"description\":\"Description\",\"media\":[{\"type\":\"image\",\"src\":\"http://img40.yfrog.com/img40/5914/iphoneconnectbtn.jpg\",\"href\":\"http://developers.facebook.com/connect.php?tab=iphone/\"}],\"properties\":{\"another link\":{\"text\":\"Facebook home page\",\"href\":\"http://www.facebook.com\"}}}"];
    [dialog show];
}

Upvotes: 0

Views: 149

Answers (1)

Chandan Shetty SP
Chandan Shetty SP

Reputation: 5117

I think you are calling the postToWall() function somewhere in the code. Call this function only when the Facebook tab is clicked. (Just put in a breakpoint and check.)

Upvotes: 1

Related Questions