从应用范围的用户 ID 中获取 Facebook 用户 ID [英] Get Facebook User ID from app-scoped User ID

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

问题描述

从 Facebook Graph API v1.0 升级到 v2.0,Facebook 使用应用范围用户 ID",所以我在我的应用中看不到原始"用户 ID.

With the upgrade from Facebook Graph API v1.0 to v2.0, Facebook is using "App-scoped User IDs", so I cannot see the "original" user ID inside my apps anymore.

我总是使用实时更新和图形 API 调用,例如https://graph.facebook.com/{postId}/comments"来分析用户在应用所在的 Facebook 页面上的活动.但由于这些数据包含原始用户 ID,我无法再将这些活动与我的注册用户匹配!

I always used the Real Time Updates and graph API calls like "https://graph.facebook.com/{postId}/comments" to analyze user activity on the Facebook page where the app was. But since these data contain the original user ID, I'm not able to match the activities to my registered users anymore!

那么有没有办法从应用范围的用户 ID 中获取原始 Facebook 用户 ID?还是反过来?

So is there a way to get the original Facebook user ID from an app-scoped user ID? Or the other way round?

我最终使用此处提到的 API 方法为所有用户获取了应用范围的 ID:https://stackoverflow.com/a/29154912/3432305 并将它们存储在我的数据库中以及旧 ID 中.然后,每当 RTU 到达时,对于老用户",我会检查哪个用户拥有此应用范围的 ID 并处理更新.至少 Facebook 设法修复了评论中提到的错误(从应用范围的用户 ID 获取 Facebook 用户 ID) 在 API v1.0 被弃用前几天,所以对于我的应用的新用户来说,它就像一个魅力.到目前为止...

I ended up fetching the app-scoped IDs for all my users using the API method mentioned here: https://stackoverflow.com/a/29154912/3432305 and stored them in my database in addition to the old ID. Then, whenever an RTU arrived, for "old users" I would check which user has this app-scoped ID and process the update. At least Facebook managed to fix the bug mentioned in the comments (Get Facebook User ID from app-scoped User ID) a few days before the API v1.0 was deprecated, so for new users of my apps, it works like a charm. So far...

推荐答案

没有(简单/明显)基于应用范围用户 ID 获得真实用户 ID 的可能性.

there's no (simple/obvious) possibility to get a real user id based on an app-scoped user id.

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

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