更新时间:2023-12-03 10:16:28
我能够使用 omniauth-facebook-access-token Gem 实现这一目标.https://github.com/SoapSeller/omniauth-facebook-access-token
I was able to achieve this using the omniauth-facebook-access-token Gem. https://github.com/SoapSeller/omniauth-facebook-access-token
在您的设计初始值设定项中创建另一个名为facebook_access_token"的 oauth 提供程序,它可以使用与 facebook 提供程序相同的凭据.
Create another oauth provider in your devise initializer called 'facebook_access_token', it can use the same credentials as the facebook provider.
将令牌作为参数access_token"发布.如果您希望应用程序的最终响应以 JSON 形式返回,请在回调 url 上使用查询字符串 ?format=json.
Post the token as the param 'access_token'. Use the query string ?format=json on the callback url if you want the final response from your app returned as JSON.