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

查看:74
本文介绍了从应用范围的用户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} /评论来分析应用程序的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!

所以有一种方法来获取原始的Facebook来自应用范围的用户ID的用户ID?或者另一种方式?

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

最好的问候,

kolli

编辑:

我最终使用这里提到的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天全站免登陆