通过安卓应用发布到用户朋友的脸书墙上
我正在开发一个 Android 应用程序,用户可以在其中使用其 facebook id 登录.我可以通过以下方法获取有关用户的所有信息,甚至可以获取其好友列表
I am developing an Android application in which the user logs in using its facebook id. I can get all the information about the user and i even get its friends list with following methods
facebookClient.request("me")
facebookClient.request("me")
facebookClient.request("我/朋友")
facebookClient.request("me/friends")
我的疑问是,我想让用户可以灵活地邀请其 facebook 好友.我不知道这里要做什么额外的工作.任何帮助将不胜感激.
My query is that i want to give flexibility to the user to invite its facebook friends. I dont know what extra stuff is to be done here. Any help will be appreciated.
签出:
如何使用Facebook android SDK在facebook墙上发帖,无需打开对话框
和
如何发帖使用 Facebook android SDK 集成 android 应用程序在 facebook 墙上的消息
这里有一个小例子,它会发布到朋友的墙(或者如果 userId 为空,则发布到当前登录用户的墙):
Here's a small example that will post to a friend's wall (or if userId is null then to the currently logged in user's wall):
protected void postToWall(String userId)
{
Bundle params = new Bundle();
params.putString("message", _messageInput.getText().toString());
params.putString("caption", "{*actor*} just posted a secret message.");
params.putString("description", "A secret message is waiting for you. Click the link to decode it.");
params.putString("name", "A Secret Message For You");
params.putString("picture", "http://www.kxminteractive.com/Content/images/app_logos/secretMessage.png");
params.putString("link", "http://www.kxminteractive.com/decrypt/" + _lookupKey);
asyncRunner.request(((userId == null) ? "me" : userId) + "/feed", params, "POST", new WallPostRequestListener());
}