我找到了解决我的问题的方法。这是导致该问题的相关代码:
- (void)postToWall {
FBStreamDialog* dialog = [[[FBStreamDialog alloc] init] autorelease];
dialog.userMessagePrompt = @"Enter your message:";
dialog.attachment = [NSString stringWithFormat:@"{\"name\":\"Check out this great restaurant!\",\"href\":\"/\",\"caption\":\"%@\",\"description\":\"%@ \r %@, %@ %@\",\"media\":[{\"type\":\"image\",\"src\":\"http://www.muslimgreenpages.ca/images/gethalal/GetHalal_IC_B_03.png\",\"href\":\"http://www.gethalalapp.com/\"}]}",
restaurantObj.name, restaurantObj.address, restaurantObj.city, restaurantObj.provinceState, restaurantObj.phoneNumber];
dialog.actionLinks = @"[{\"text\":\"Download GetHalal!\",\"href\":\"http://www.gethalalapp.com/\"}]";
[dialog show];
_posting = NO;
[_session logout];
}
在我dialog.attachment,我没有为href参数提供一个值,所以我干脆删除它,一切正常!非常感谢mdominick帮助。
保重。
我实际上使用FBConnect登录。这是问题吗? – syedfa