问题标签 [facebook-access-token]

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 回答
2077 浏览

ios - 在 Facebook iOS SDK 中存储 accessToken

我在我的应用程序中设置了Facebook iOS SDK 。但是,我无法确定我的会话何时结束。如何检查它是否完成,以及在哪里(如何)存储登录收到的访问令牌?

我需要从一开始就确定我是否拥有访问令牌,以便我知道是再次登录还是在应用程序中继续前进。

0 投票
2 回答
614 浏览

facebook - Facebook离线访问密钥/登录问题

当用户第一次访问我的应用程序时,我会请求几个权限(user_checkins, publish_stream, offline_access)。在允许所有权限后,用户转到隐私设置并删除前 2 个设置之一(不是offline_access)。即使用户注销并返回我的应用程序,Facebook 也不会要求他允许返回已删除的权限。

当我开始请求离线访问权限时出现了问题,因为访问令牌没有刷新,令牌仍然包含权限。

如何为具有正确权限的用户请求新令牌?

0 投票
2 回答
1014 浏览

javascript - Getting the Facebook Access Token OUTSIDE of the function

So I am using a function as such to get the access token of the already authenticated user that is currently on my website:

The only way to know the access token it seems is to be within the anonymous function called within the call to FB.getLoginStatus.

I have determined that the problem is that the anonymous function inside of FB.getLoginStatus is not executed until the end of all other scripts on the page. Therefore, the variable "token" will not be set until everything is done executing, rendering it useless.

Is there a way then to extract the access token into a universally accessible variable? I don't want to have to write all my code which requires knowledge of the access token in a single anonymous function.

0 投票
3 回答
10118 浏览

facebook - Facebook Graph API getAccessToken()不起作用

过去几天我一直在研究 Graph API。当我尝试使用 PHP-SDK 进行 API 调用时,我得到一个空的 json 对象作为响应。但是,当我从 FB 在http://developers.facebook.com/docs/reference/api/提供的链接中复制访问令牌时,我得到一个 json 响应。

我认为这是因为我在请求中发送的访问令牌。帮助赞赏。

我的代码:

0 投票
1 回答
9727 浏览

facebook - 必须使用活动访问令牌来查询有关当前用户的信息

有谁知道我为什么会得到这个例外?$user 的 print_r 正在产生

为什么会这样?

0 投票
1 回答
5563 浏览

jquery - Facebook Graph API Get Access Token via JQuery (Client way)

OK, so this is driving me nuts. Have been trying to get the access token for my app using jquery. When I have the access token everyting is working fine. I can retrieve friends list etc. If I sniff the URL from my request and paste it in a browser it does as expected (gives me the access token and redirects to my page).

But...using the below function either results in a "jQuery15105307047630302168_1315247312743 was not called" or if I change the dataType to "JSON" in a "No transport" error message. I have been reading a bunch of posts and nothing seems to do the trick.

Some suggest adding ?callback? and a parameter which is the callback function itself, but this gives me the exact same error. Below is the function that I am calling to get the access token.

Please help.

0 投票
1 回答
5062 浏览

facebook - 签名请求示例并获取访问令牌

在下面的代码中有一个从未定义的变量。该变量是 $access_token。需要添加将获得新访问令牌的代码,以便程序可以在不产生任何异常的情况下执行。我一直在阅读有关 oauth flow 等的 Facebook 文档,但我似乎无法弄清楚如何获取此代码认为可接受的这些访问令牌之一。有谁知道可以用这个做什么?

0 投票
1 回答
25192 浏览

php - 必须使用活动访问令牌来查询有关当前用户的信息

我已经定义了一个访问令牌。它是使用 curl 获得的新访问令牌。为什么我仍然收到错误:必须使用活动访问令牌来查询有关当前用户的信息。

0 投票
2 回答
110 浏览

facebook - 自动将 Facebook 用户连接到我的网站

我正在为我的应用程序搜索新东西时不小心进入了这个网站:
http
://docs.com/ 进入该网站时,我连接到我的 Facebook 帐户,突然我看到我的名字/图片/id 出现在上面网站,让我注意到我没有注册到这个网站,也没有给它我的访问令牌..

有人对这种现象有解释吗?

0 投票
2 回答
189 浏览

android - 如何使用 GraphAPI 从 facebook 检索 accesstoken?

如何使用 GraphAPI 从 facebook 检索 accesstoken?我已经使用 outh 示例获得了访问令牌,但它不起作用..