开发者

Problem with integrating Facebook in my application

开发者 https://www.devze.com 2023-01-07 11:25 出处:网络
The message which is to posted on the wall of Facebook is automatically open without clicking the Facebook tab.

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];
}


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.)

0

精彩评论

暂无评论...
验证码 换一张
取 消