[英]Post on user's friends facebook wall through android application
我正在开发一个Android应用程序,其中用户使用其 facebook id 登录。 我可以获取有关用户的所有信息,甚至可以通过以下方法获取其朋友列表
facebookClient.request("我")
facebookClient.request("我/朋友")
我的问题是我想给用户灵活性来邀请它的 facebook 朋友。 我不知道这里要做什么额外的事情。 任何帮助将不胜感激。
查看:
如何使用 Facebook android ZF20E3C5E54C0AB3D3765D660B3F9 在 facebook 墙上张贴,无需打开对话框
和
How to post message on facebook wall using Facebook android SDK integrate android app
这是一个将发布到朋友墙上的小示例(或者如果 userId 是 null 则发布到当前登录用户的墙上):
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());
}
使用它在 id(uid) 的朋友墙上发送消息:
Bundle params = new Bundle();
params.putString("message", "hello ...");
Utility.mAsyncRunner.request(uid+"/feed", params, "POST", new FriendRequestListener(), null);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.