如何调试Facebook连接问题?

问题描述:

我已经设置了我的应用程序与Facebook连接(使用Omniauth),它似乎适用于某些帐户,但对于其他人它返回臭名昭着的An error occurred错误。如何调试Facebook连接问题?

这并不是说它偶尔会发生,但对于某些用户来说一直如此。沙盒模式关闭,APP键等等和域显然设置正确,否则它总会抛出错误。如何从消息中调试这个模糊的消息?

编辑2

该应用域设置正确,所以是命名空间。我选择了“使用Facebook登录的网站”以及“移动网站”,而且网址是正确的,而不是HTTPS(都使用相同的网址)。我也重置了应用程序的秘密,以防万一,但这并没有解决问题。

+0

我不知道如何调试,但我有时与https这样的问题。 – yacon

+0

错误只会在洞察仪表板中显示(如果它们正确地归因于您的应用),如果请求完全无效,缺少应用ID,在该应用ID的无效URL中使用,则不会发生这种情况 – Igy

+0

@Igy谢谢进行评论。所有这些细节看起来都是正确的,正如问题中提到的一些登录请求(即使用我的帐户和其他一些登录请求)完美地工作。 – Simpleton

您可以安装Wireshark并监控来回的流量与好的和坏的帐户 - 然后确定差异?

+1

我不明白这将如何帮助。 – Simpleton

尝试与这些下面的例子:

omniauth_callbacks_controller :: process_callback方法这样

# If a user is signed in then he is trying to link a new account 
    if user_signed_in? 
     if authentication.persisted? # This was a linking operation so send back the user to the account edit page 
     flash[:success] = I18n.t "controllers.omniauth_callbacks.process_callback.success.link_account", 
           :provider => registration_hash[:provider].capitalize, 
           :account => registration_hash[:email] 
     else 
     flash[:error] = I18n.t "controllers.omniauth_callbacks.process_callback.error.link_account", 
           :provider => registration_hash[:provider].capitalize, 
           :account => registration_hash[:email], 
           :errors =>authentication.errors 
     end 
     redirect_to edit_user_account_path(current_user) 

,并参考以下位置:OAuthException (#210) User not visible

我认为这可以帮助你解决你的问题。

+0

这不是在应用程序方面的问题,正如问题评论中提到的那样,210错误与此无关。 – Simpleton