如何从iOS SDK中的Facebook对象获取Facebook用户ID? [英] How do I get the Facebook user Id from the Facebook object in the iOS SDK?

查看:121
本文介绍了如何从iOS SDK中的Facebook对象获取Facebook用户ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到访问令牌在Facebook对象中可用,但我没有看到Facebook用户ID。

I see that the access token is available in the Facebook object, but I don't see a Facebook user Id.

我可以发出图形请求我获得Facebook ID,但我不想再拨打额外的api电话。

I could make a graph request to "me" to get the Facebook Id, but I'd prefer not to make the extra api call.

推荐答案

你将不得不打电话给我/获取身份证。 iOS访问令牌现在已加密,因此您无法从中解析用户ID。此外,服务器端令牌也将很快用oauth 2.0加密。

You will have to call /me to get the id. iOS access tokens are now encrypted and thus you won't be able to parse the user id from it. Also, server side tokens will all be encrypted with oauth 2.0 soon too.

这篇关于如何从iOS SDK中的Facebook对象获取Facebook用户ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆