2011-05-27 87 views
2

我正在做一个示例的Facebook应用程序,我只是一个文件发布到一个特定的人,而我这样做,我得到了像..如何解决OAuthException,而我张贴在facebook上的消息

05-27 14:33:51.806: DEBUG/Response(2211): {"error":{"type":"OAuthException","message":"(#803) Some of the aliases you requested do not exist: friends"}} 

代码:

Bundle b = new Bundle(); 
accesstoken = facebook.getAccessToken(); 
b.putString("method", "read_stream"); 
b.putString("attachment","{\"name\":\"" + "\",\"href\":\"google.co.in"; + "\",\"description\":\"" + "\",\"media\":[{\"type\":\"image\",\"src\":\"" + "" + "\",\"href\":\"" + "\"}]}"); 
String response = facebook.request("friend_id", b, "POST"); 
+0

如果你更专一,也许专家可以提供帮助。例如,你的代码是什么? – 2011-05-27 09:21:24

+0

Bundle b = new Bundle(); accesstoken = facebook.getAccessToken(); b.putString(“method”,“read_stream”); b.putString(“attachment”,“{\”name \“:\”“\t +”\“,\”href \“:\”http://www.google.co.in“ \t \t \t \t \t \t \t \t \t + “\” \ “描述\”:\ “” \t \t \t \t \t \t \t \t \t + “\” \ “媒体\”:[{\ “类型\”:\ “image \”,\“src \”:\“” \t \t \t \t \t \t \t \t \t + “” \t \t \t \t \t \t \t \t \t + “\” \ “HREF \”:\ “” \t \t \t \t \t \t \t \t \t + “\”}]}“); String response = facebook.request(“friend_id”,b,“POST”); – BenTen 2011-05-27 10:23:52

回答

0

您是否尝试过检查文档,Facebook和获取知识,是“朋友”是不对的,你应该使用“朋友”或“好友列表”来代替。

+0

我得到我的朋友列表并存储在一个数组列表中,然后我捆绑它,关键值是friend_id ,,,,我可以使用该密钥发布消息 – BenTen 2011-05-27 10:03:55

+0

您使用哪种方法发布? – ACM64 2011-05-27 10:09:55

+0

Bundle b = new Bundle(); accesstoken = facebook.getAccessToken(); b.putString(“method”,“read_stream”); b.putString(“attachment”,“{\”name \“:\”“\t +”\“,\”href \“:\”http://www.google.co。在” \t \t \t \t \t \t \t \t \t + “\” \ “描述\”:\ “” \t \t \t \t \t \t \t \t \t + “\” \ “媒体\”:[{\ “类型\”:\ “图像\”,\ “SRC \”:\ “” \t \t \t \t \t \t \t \t \t + “” \t \t \t \t \t \t \t \t \t + “\” \ “HREF \”:\ “” \t \t \t \t \t \t \t \t \t + “\”}]}“); String response = facebook.request(“friend_id”,b,“POST”); – BenTen 2011-05-27 10:20:29