Facebook Graph API:结果为数组或 json 对象
我对图 api 结果之间有点困惑。任何人都可以解释当我们通过图 api 获取数据时 facebook 使用哪种默认对象方法。具有用于访问 json 对象或数组对象中的数据的任何应用程序帐户设置,因为有时我发现用户数据是加密的,有时是未加密的。 我通过 facebook graph api 通过两种方式找到了用户电子邮件 ID。 第一个是:
{
"id": "100001114785800",
"name": "Stella Jackson",
"first_name": "Stella",
"last_name": "Jackson",
"link": "http://www.facebook.com/profile.php?id=100001114785800",
"birthday": "04/16/1987",
"gender": "female",
"email": "[email protected]",
"timezone": 5.5,
"locale": "en_US",
"updated_time": "2010-10-08T13:26:10+0000"
}
第二个是:
{
"id": "100001114785800",
"name": "Stella Jackson",
"first_name": "Stella",
"last_name": "Jackson",
"link": "http://www.facebook.com/profile.php?id=100001114785800",
"birthday": "04/16/1987",
"gender": "female",
"email": "stella_ja\u0040live.com",
"timezone": 5.5,
"locale": "en_US",
"updated_time": "2010-10-08T13:26:10+0000"
}
有什么想法吗?
谢谢
I have little bit confuse between graph api result.Can any one explain which default object method is facebook using when we fetch data via graph api. Have any application account setting for access data in json object or in array object, because some time i found user data in encrypted and some time non encrypted.
I found user email id in two way from facebook graph api.
One is:
{
"id": "100001114785800",
"name": "Stella Jackson",
"first_name": "Stella",
"last_name": "Jackson",
"link": "http://www.facebook.com/profile.php?id=100001114785800",
"birthday": "04/16/1987",
"gender": "female",
"email": "[email protected]",
"timezone": 5.5,
"locale": "en_US",
"updated_time": "2010-10-08T13:26:10+0000"
}
And second one is:
{
"id": "100001114785800",
"name": "Stella Jackson",
"first_name": "Stella",
"last_name": "Jackson",
"link": "http://www.facebook.com/profile.php?id=100001114785800",
"birthday": "04/16/1987",
"gender": "female",
"email": "stella_ja\u0040live.com",
"timezone": 5.5,
"locale": "en_US",
"updated_time": "2010-10-08T13:26:10+0000"
}
Have any idea?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
@Vik我想做同样的事情,收集数组中的帖子信息,如果它有效的话试试这个。
@Vik i want to do the same thing, collect post info in array, try this if it work than see..
“\u0040”与“@”符号的混淆或 Unicode 形式相同。大多数解析器可以将其转换为原始符号。
检查这里以获取 Unicode 字符集列表。
http://www.alanwood.net/demos/ansi.html
The '\u0040' is same as obfuscated or Unicode form of '@' symbol. Most Parsers can convert that to the original symbol.
Check this for list of Unicode character set.
http://www.alanwood.net/demos/ansi.html
最简单的方法是获取电子邮件字符串并执行类似的操作(目标 c):
换句话说,使用字符串方法将“\u0040”替换为“@”。
The easiest way would be to take the email string and do something like this (objective c):
So in other words, use string methods to replace "\u0040" with "@".
您可以简单地将
\u0040
替换为@
,但在此替换期间,编译器会将"\"
视为转义序列,并会跳过此序列而不进行更改。你会像下面这样做什么:
you can simply replace
\u0040
with@
but during this replace compiler will consider"\"
as escape sequence and will skip this without making changes.What you do like this below:
使用这个来获取ios的电子邮件的字典n值
希望它对你有帮助。
Use this to get the dictionary n value of email for ios
Hope it helps you.