图 API v2.3,无法将读取权限 (read_custom_friendlists) 传递给发布授权请求
Graph API v2.3 , Cannot pass a read permission (read_custom_friendlists) to a request for publish authorization
我正在尝试在我的 Android 应用程序中添加访问朋友列表的额外权限,有很多关于旧 API 图的资源,但找不到新 API 的任何资源,所以我尝试向数组添加新权限,但它没有用,我遇到了上述错误。
public void getProfileInformation()
{
AccessToken token = AccessToken.getCurrentAccessToken();
LoginManager.getInstance().logInWithPublishPermissions(LoginActivity.this, Arrays.asList(new String[]{"email", "publish_actions", "user_birthday", "user_hometown","read_custom_friendlists"}));
final GraphRequest request = GraphRequest.newMeRequest(token, new GraphRequest.GraphJSONObjectCallback() {
@Override
public void onCompleted(JSONObject object, GraphResponse response) {
try {
Log.d("Firstname", object.getString("id"));
} catch (JSONException e) {
e.printStackTrace();
}
Log.d("Response Friend List", response.toString());
}
});
final Bundle parameters = new Bundle();
parameters.putString("fields", "id, email, picture, birthday");
parameters.putString("user", "100006601683765");
GraphRequestAsyncTask graphRequest = new GraphRequest( AccessToken.getCurrentAccessToken(),"/{user-id}/", null , HttpMethod.GET ,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
parameters.putString("fields", "id, email, picture, birthday");
parameters.putString("user", "100006601683765");
request.setParameters(parameters);
//request.getParameters();
request.executeAsync();
Log.d("Yasser List",request.getGraphPath());
}
}
).executeAsync();
}
Graph API v2.3 , Cannot pass a read permission
(read_custom_friendlists) to a request for publish authorization
此错误表示您无法在
中传递这些权限
logInWithPublishPermissions
你用过
LoginManager.getInstance().logInWithReadPermissions(instance, Arrays.asList("public_profile","user_friends","email"));
NOT This
LoginManager.getInstance().logInWithPublishPermissions(LoginActivity.this, Arrays.asList(new String[]{"email", "publish_actions", "user_birthday", "user_hometown","read_custom_friendlists"}));
许可 'read_custom_friendlists' 似乎已弃用。有关详细信息,请参阅 Facebook documentation。
我正在尝试在我的 Android 应用程序中添加访问朋友列表的额外权限,有很多关于旧 API 图的资源,但找不到新 API 的任何资源,所以我尝试向数组添加新权限,但它没有用,我遇到了上述错误。
public void getProfileInformation()
{
AccessToken token = AccessToken.getCurrentAccessToken();
LoginManager.getInstance().logInWithPublishPermissions(LoginActivity.this, Arrays.asList(new String[]{"email", "publish_actions", "user_birthday", "user_hometown","read_custom_friendlists"}));
final GraphRequest request = GraphRequest.newMeRequest(token, new GraphRequest.GraphJSONObjectCallback() {
@Override
public void onCompleted(JSONObject object, GraphResponse response) {
try {
Log.d("Firstname", object.getString("id"));
} catch (JSONException e) {
e.printStackTrace();
}
Log.d("Response Friend List", response.toString());
}
});
final Bundle parameters = new Bundle();
parameters.putString("fields", "id, email, picture, birthday");
parameters.putString("user", "100006601683765");
GraphRequestAsyncTask graphRequest = new GraphRequest( AccessToken.getCurrentAccessToken(),"/{user-id}/", null , HttpMethod.GET ,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
parameters.putString("fields", "id, email, picture, birthday");
parameters.putString("user", "100006601683765");
request.setParameters(parameters);
//request.getParameters();
request.executeAsync();
Log.d("Yasser List",request.getGraphPath());
}
}
).executeAsync();
}
Graph API v2.3 , Cannot pass a read permission (read_custom_friendlists) to a request for publish authorization
此错误表示您无法在
中传递这些权限logInWithPublishPermissions
你用过
LoginManager.getInstance().logInWithReadPermissions(instance, Arrays.asList("public_profile","user_friends","email"));
NOT This
LoginManager.getInstance().logInWithPublishPermissions(LoginActivity.this, Arrays.asList(new String[]{"email", "publish_actions", "user_birthday", "user_hometown","read_custom_friendlists"}));
许可 'read_custom_friendlists' 似乎已弃用。有关详细信息,请参阅 Facebook documentation。