0

我升级了我的游戏以使用 facebook SDK 3.1,它适用于 iOS 6,我希望它也适用于 iOS 5。我希望它像在 SDK 3.0 中一样显示帖子的 facebook 预览。

这是我的代码。现在它只是自动发布。Facebook 现在是否允许在用户不输入状态的情况下自动分享和更新状态?Facebook 过去不允许这样做。

if(!displayedNativeDialog)
{
NSLog(@"\nNative dialog failed to display.");

[self performPublishAction:^{

// otherwise fall back on a request for permissions and a direct post
NSMutableDictionary* params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:[NSString stringWithFormat:@"%s", m_pLink], @"link", [NSString stringWithFormat:@"%s", m_pGameName], @"name", nil];

[FBRequestConnection startWithGraphPath:@"me/feed" parameters:params HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection, id result, NSError *error)
{
[self showAlert:message result:result error:error];
}
];

}];
4

2 回答 2

0

您必须在 Build Phases 配置选项中将 Frameworks AdSupport、Social 和 Accounts 从必需更改为可选。

于 2012-10-11T13:14:22.670 回答
0

tkanzakic 指出了正确的答案,所以我将再次重新发布链接,因为有人可能在答案回复中看不到它。

https://github.com/sakrist/FacebookSample

我测试了这个框架,它运行良好。它遵循 facebook sdk 规范。

谢谢,

于 2012-10-18T00:20:10.560 回答