我想使用 android facebook sdk 3.0.2 在 facebook 上分享一些文本
我试过这个:
Bundle params = new Bundle();
params.putString("caption", "test");
params.putString("message", "test");
params.putString("link", "https://www.google.com");
// params.putString("picture", "picture_url");
Request request = new Request(Session.getActiveSession(),
"me/feed", params, HttpMethod.POST);
request.setCallback(new Request.Callback() {
@Override
public void onCompleted(Response response) {
if (response.getError() == null) {
Toast.makeText(About.this, "Successfully posted",
Toast.LENGTH_LONG).show();
} else
Toast.makeText(About.this, "An Error Has Happened",
Toast.LENGTH_SHORT).show();
}
});
request.executeAsync();
}
吐司总是在打印an error has happened