Facebook的 - "不能用自己的用户名和QUOT查询用户;解 [英] Facebook - "Cannot query users by their username" solution

查看:422
本文介绍了Facebook的 - "不能用自己的用户名和QUOT查询用户;解的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个Android应用程序。我使用的是HttpURLConnection类让Facebook用户的资料图片。该URL看起来是这样的:

<$p$p><$c$c>http://graph.facebook.com/?ids=username1,username2,username3&fields=picture&type=square

但现在,因为V2.2并没有让我得到用户谁不使用我的Facebook应用程序配置文件的图片,它抛出一个错误:

  

{错误:{

 消息:(#803)无法查询用户可以通过自己的用户名(用户名1),
  类型:OAuthException,
  code:803}}
 

我没有兴趣使用脸谱SDK为Android。比方说,我用一个弹出的WebView授权我的Facebook应用程序。网址是什么会让我做同样的事情?有没有这样一个简单的解决方案:

graph.facebook.com/?app=APP-ID&ids=username1,username2&fields=picture

解决方案

由于API的2.0版,你不应该使用的用户名都 - 和that's为什么你不容查询用户可以通过他们的用户名了。获得访问用户的数据的唯一方法是通过授权的用户,并使用 /我终点。

主要规则:忘掉用户谁没有授权您的应用程序,你不应该让那些对任何数据隐私理由

I am developing an android app. I was using a HttpURLConnection to get profile pictures of facebook users. The URL looks like this:

http://graph.facebook.com/?ids=username1,username2,username3&fields=picture&type=square

But now, since v2.2 doesn't let me to get profile pictures of users who are not using my facebook app, it throws an error:

{ "error": {

  "message": "(#803) Cannot query users by their username (username1)",
  "type": "OAuthException",
  "code": 803    } }

I am not interested in using "Facebook SDK for Android". Let's say I use a pop-up webview to authorize my facebook app. What url would let me do the same thing? Is there a simple solution like this:

graph.facebook.com/?app=APP-ID&ids=username1,username2&fields=picture

解决方案

Since v2.0 of the API, you are not supposed to use usernames at all - and that´s why you can´t query users by their username anymore. The only way to get access to data of a user is by authorizing that user and using the /me endpoint.

Main rule: Forget about users who did not authorize your App, you are not supposed to get any data of those for privacy reason.

这篇关于Facebook的 - &QUOT;不能用自己的用户名和QUOT查询用户;解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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