问题标签 [facebook-login]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
23798 浏览

facebook - facebook connect 或 facebook login 是否可用于 WAP/移动网站

我想在我的移动网站上实现 fb 连接和 fb 登录功能。

facebook connect 或 facebook login 是否可用于 WAP/移动网站?

谢谢...

0 投票
1 回答
1100 浏览

facebook - Facebook:自定义登录按钮

我想为 facebook 登录设计一个自定义登录按钮,如下所示

http://dribbble.com/shots/190494-Log-in-with-Facebook
在此处输入图像描述

主要目标是与网站的主题同步。

这对 Facebook 的 TOS 是否可以接受?

0 投票
2 回答
1175 浏览

android - 无法获取 Facebook 登录屏幕?

我正在关注Facebook Android SDK 教程,并且在我的应用程序中拥有通往此步骤的所有代码。我启动应用程序(在我的手机上测试它,但在模拟器中也是如此),然后这个屏幕出现了:

在此处输入图像描述

好,很好!

但是,一旦它完成加载,而不是像这里给出的示例那样出现任何类型的登录屏幕:

在此处输入图像描述

我只是想出这个:

在此处输入图像描述

代码:

好的,我删除了项目并重新开始。以前的这个屏幕正在做一些事情,但不断地一遍又一遍地重新加载这个加载屏幕。几乎就像它为 1000 种不同的东西联系 Facebook 的服务器,每一种都有一个加载屏幕。我不知道该怎么办。Logcat 中没有错误。

在此处输入图像描述

0 投票
2 回答
12948 浏览

ios - 安装了 Facebook 应用的 Facebook SDK iOS 登录

更新:我意识到只有当用户已经让 Facebook 访问我的应用程序,然后重新安装我的应用程序时,才会出现以下问题。用户第一次在我的应用程序中选择Facebook按钮时,它会去Facebook应用程序进行认证,但是由于认证状态仍然保存在Facebook应用程序中,所以它立即返回到我的应用程序而不向用户解释,并且postToFacebookWall 方法失败。

更新 2:我最终实现了此处找到的解决方案:如何使用新的 Facebook Connect iOS API 通过 DIALOG 授权用户?并避免使用 Facebook 应用程序。Safari 更好,因为至少用户会收到一条消息,说他们将登录。但是,Feed 对话仍然像以前一样第一次失败。


我遇到了一定是常见问题,但我还没有找到解决方案。请注意,我的应用程序仅限于 iOS 5 及更高版本。

我有一个带有 Facebook 按钮的应用程序,用于发布到用户墙上。按下按钮时,应用程序将检查用户是否已授予应用程序发布到墙上的权限。如果有,则会弹出一个带有墙帖信息的提要对话框的视图。如果他们没有,Safari 将被打开并允许用户登录。登录后,他们将被带回应用程序,并弹出 Feed Dialog 视图。

如果未安装 Facebook 应用程序,这适用于模拟器和我的设备。如果安装了 Facebook 应用程序,用户将被带到 Facebook 应用程序,但随后立即返回到原始应用程序,不允许用户做任何事情。提要对话框弹出,但它完全空白并自动关闭。再次按下 Facebook 按钮将打开 Feed Dialog 视图,一旦用户授予应用程序发布到他们的墙上的权限,它就应该如此。

我几乎按照此处的说明进行操作:http: //developers.facebook.com/docs/mobile/ios/build/#implementsso

在这里:http: //developers.facebook.com/docs/reference/dialogs/feed/

在 AppDelegate 我有以下代码:

这和示例代码之间的唯一区别是我添加了一个由我的视图控制器拾取的 NSNotification,其中我有以下代码:

有谁知道如何解决我的问题?(另外,如果不清楚,YOUR_APP_ID 会在我的代码中替换为我的应用程序 ID)。

0 投票
1 回答
664 浏览

iphone - 在我的 iPhone 应用程序中登录 Facebook

我添加了 Facebook API 来共享我的应用程序信息。我已经测试了登录,但是当我点击应用程序中的登录按钮时,Safari 会打开登录页面。我会在我的应用程序中处理这个登录(例如在我的网络视图中)。我怎样才能做到这一点?

0 投票
1 回答
750 浏览

facebook - 如何访问 Facebook 重定向页面中的用户数据

我为我的网站添加了 facebook 登录按钮。代码如下,

当用户单击“使用 facebook 登录”按钮时,将显示具有扩展权限的身份验证窗口。当用户允许访问详细信息时,用户将被定向到 index.php 文件使用

现在我想打印所有允许访问的详细信息,例如用户名、生日等。在 index.php 文件中
谁能告诉我该怎么做?

0 投票
4 回答
104233 浏览

facebook - 如何使用我的自定义图像更改 facebook 登录按钮

我的脚本有这样的代码

它使用 facebook 的默认登录按钮插件。但我想使用我的自定义 facebook 连接图像。谁能帮我?

0 投票
1 回答
2316 浏览

facebook - "Client-Side Authentication Example" on Chrome for OS X does not work (error=unknown_user)

Original Post:

I am trying to use the "Client-side Authentication with the Javascript SDK" on Chrome for OS X (17.0.963.83). The code is copied directly from the Facebook example (with the YOUR_APP_ID updated):

When I click on "Login", the Facebook pop-up window appears. I click on "Log In with Facebook", the pop-up disappears, and the "auth-loggedin" div appears along with my name and the logout link. However, when I refresh the page, the page loses its Facebook authorization status and returns to the logged-out state.

The expected behavior would be for the page to remain in the logged-in state.

Using the console, I noticed that the fbsr cookie appears temporarily, and disappears once the page is refreshed. In addition, the following error is caught in the console:

Unsafe JavaScript attempt to access frame with URL https://s-static.ak.fbcdn.net/connect/xd_proxy.php#cb=f16adb7b1c&origin=http%3A%2F%2F[BASE DOMAIN]%2Ff22295b918&relation=opener&transport=postmessage&frame=f3e8d40458&access_token=[ACCESS TOKEN]&expires_in=4221&signed_request=[SIGNED REQUEST]&base_domain=[BASE DOMAIN] from frame with URL [MY CODE URL]#. Domains, protocols and ports must match.

I made sure that the channel file was available and am unable to reproduce this error in Firefox or Safari on OS X or on IE, Firefox, or Chrome on Windows. Any ideas? I can work around this using server-side authentication but prefer to use client-side, if possible.

1st EDIT: Further testing

So I now think that the "Unsafe JavaScript" error is a red herring. I am using the channel file, but it is not being hit either in Firefox or Chrome.

Looking at the network traffic on Firefox vs Chrome, when the page first loads, and assuming I'm logged into Facebook on both browsers, I see the following requests being processed:

Firefox

  • [facebook url]/dialog/oauth?api_key=[app_id]&app_id=[app_id]&channel_url=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23cb%3Df24509714bbf8d%26origin%3Dhttp%253A%252F%252F[base_domain]%252Ff193ade24ab412%26relation%3Dparent.parent%26transport%3Dpostmessage&client_id=[app_id]&display=none&domain=[base_domain]&locale=en_US&origin=1&redirect_uri=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23cb%3Df2b6c8dce7b8936%26origin%3Dhttp%253A%252F%252F[base_domain]%252Ff193ade24ab412%26relation%3Dparent%26transport%3Dpostmessage%26frame%3Df22112636bf762a&response_type=token%2Csigned_request%2Ccode&sdk=joey

  • [ssl facebook url]/dialog/oauth?api_key=[app_id]&app_id=[app_id]&channel_url=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23cb%3Df24509714bbf8d%26origin%3Dhttp%253A%252F%252F[base_domain]%252Ff193ade24ab412%26relation%3Dparent.parent%26transport%3Dpostmessage&client_id=[app_id]&display=none&domain=[base_domain]&locale=en_US&origin=1&redirect_uri=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23cb%3Df2b6c8dce7b8936%26origin%3Dhttp%253A%252F%252F[base_domain]%252Ff193ade24ab412%26relation%3Dparent%26transport%3Dpostmessage%26frame%3Df22112636bf762a&response_type=token%2Csigned_request%2Ccode&sdk=joey

  • [ssl fbcdn url] /connect/xd_proxy.php#cb=f2b6c8dce7b8936&origin=http%3A%2F%2F[base_domain]%2Ff193ade24ab412&relation=parent&transport=postmessage&frame=f22112636bf762a&code=2.AQBMIMy0rSFAnqaA.3600.1332514800.1-5322361%7CU-RUi4ON2SbzfzzDT03CTeT-DgQ&signed_request=[signed_request]&access_token=[access_token]&expires_in=4302&base_domain=[base_domain]&https=1

Chrome

  • [facebook url] /dialog/oauth?api_key=[app_id]&app_id=[app_id]&channel_url=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23cb%3Df1b2a93294%26origin%3Dhttp%253A%252F%252F[base_domain]%252Ffdca87bc8%26relation%3Dparent.parent%26transport%3Dpostmessage&client_id=[app_id]&display=none&domain=[base_domain]&locale=en_US&origin=1&redirect_uri=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23cb%3Df14d4dd364%26origin%3Dhttp%253A%252F%252F[base_domain]%252Ffdca87bc8%26relation%3Dparent%26transport%3Dpostmessage%26frame%3Df230336ee8&response_type=token%2Csigned_request%2Ccode&sdk=joey

  • [ssl fbcdn url] /connect/xd_proxy.php#cb=f14d4dd364&origin=http%3A%2F%2F[base_domain]%2Ffdca87bc8&relation=parent&transport=postmessage&frame=f230336ee8&error=unknown_user

I imagine this is because Chrome does not have the fbsr cookie set; which is a long way of leading me back to my original question. Why isn't Chrome setting the fbsr cookie (and, does it have something to do with the "Unsafe JavaScript attempt to access frame with URL" since that is sending the signed_request value in the hash?)

After all that, I'm going with bug. Unless anybody has a better idea!

0 投票
1 回答
355 浏览

javascript - 登录按钮和 auth dosnt 在 Internet Explorer 中工作

我有一些适用于 Firefox 和其他浏览器的登录代码,但是当我在 Internet Explorer 中使用它时出现错误。帮我。

这是代码:http: //jsfiddle.net/6HXmS/1/

0 投票
1 回答
454 浏览

html - 如何在 Blackberry Playbook Application 中实现 Facebook 或 Twitter 登录

我一直在开发黑莓剧本应用程序,即。HTML5/Webworks,我想为我的应用程序实现 Facebook 登录的功能,但由于某些原因我不能这样做。

为了测试,我一直在使用 Ripple Emulator

facebook登录按钮的代码 -

按钮 - Facebook 开发者

我在body标签下方添加了这段代码

使用此代码,我可以看到登录按钮,但是当我单击该按钮时,它不会像我们在 Web 应用程序上那样生成弹出窗口。

请提出任何相同的想法。

问候