简体   繁体   中英

How can solve OAuthException while i am post a message on facebook

i am doing a sample Facebook application in that i am POST a file to a particular person only, while i am doing this i got an error message like..

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

Code:

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"); 

Have you tried to check documentation for facebook and obtain knowledge, that "friends" is wrong, you should use "friend" or "friendlist" instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM