![](/img/trans.png)
[英]Facebook login screen flashing on iPhone app when already authenticated
[英]iPhone Facebook login screen issues
在我的應用程序中,我有一個按鈕,可讓您發布到Facebook。 如果您尚未允許該應用訪問您的Facebook,則必須登錄。
[fbGraph authenticateUserWithCallbackObject:self andSelector:@selector(doThePost) andExtendedPermissions:@"publish_stream"];
上面的這一行是通過Facebook登錄名顯示Web視圖的內容。 我的應用程序僅是橫向的,並且登錄頁面以縱向加載。 敲擊文本時,鍵盤將橫向加載並覆蓋頁面。 另外,如果您在鍵盤上按了“完成”,則您將停留在Web視圖中(我無法在其上找到后退按鈕)。
我在應用程序中對Facebook的處理不多,有人對它有任何建議嗎? 謝謝!
該鏈接有望幫助您開始解決定向問題。
關於添加后退/關閉按鈕,可能有以下用途:
- (void)webViewDidFinishLoad:(UIWebView *)_webView {
if (hasHitFinishCallback == NO)
{
//add our own cancel button
UIButton *cancelButton = [UIButton buttonWithType:UIButtonTypeCustom];
[cancelButton setImage:[UIImage imageNamed:@"btn_cancel.png"] forState:UIControlStateNormal];
[cancelButton setFrame:CGRectMake(240, 7, 57, 31)];
[cancelButton addTarget:self action:@selector(dismissAuthenticationView:) forControlEvents:UIControlEventTouchUpInside];
[webView addSubview:cancelButton];
[webView bringSubviewToFront:cancelButton];
hasHitFinishCallback = YES;
}
}
- (void)dismissAuthenticationView:(id)sender
{
[webView removeFromSuperview];
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.