2011-05-27 96 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